-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better start-up avoiding sudo #71
Comments
This is almost the same as passwordless sudo |
Passwordless sudo requires sudo privilege granted to the user. With setuid, "kind-of" sudo privilege is granted to the app. Please note that nvidia-xrun is a bash script. If it were an executable binary with proper setuid, an approach like above would avoid password requirement, without sudo. |
You don't need permission to use sudo; you need permission to run commands with sudo. The main problem here is that you nvidia-xrun doesn't let you run it as root. But if you extract the parts of
This line grants all human users the right to |
Nope. Your code almost grants root permissions to run any command to anyone who tweaks enough. suid binaries are hard to be safe, and some distributions persuing safety try very hard to remove all suid binaries. |
Hi Guys, here i agree with @ExoticMatter , there is a plan to do it as he suggests. |
Story: My kids wanted to start steam and play games on my laptop without starting bumblebee, entering password for sudo, etc. I was looking for a way for how to improve this and one of a sudden I came across nvidia-xrun, which is the way I wanted to run graphical programs on my asus rog laptop, with optimus card. I have begun using nvidia-xrun, which runs perfectly. However, starting it requires
sudo
operation. Therefore it would be nicer to have setuid kind of alternative to start the script. Also, typically no one invokes sudo during login, even though privileged apps run in the background.I think setuid is a good fit and it is ok for me to compile a binary, setuid it and start the
nvidia-xrun
session using the binary. It will help my kid to enter only the following:nvidia-xrun-setuid-root.c:
Just an idea, in case anyone needs it, or you may improve and enhance your product!
The text was updated successfully, but these errors were encountered: