-
Notifications
You must be signed in to change notification settings - Fork 36
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
doas should prefer executables in system PATH over local #128
Comments
Lines 79 to 95 in b96106b
What exactly gave you that impression? |
OK I have egg on my face. Sorry about that. I'll edit my original post so not to spread miss-information. I don't know why I had the problem when I tested it. So yes the nopass part was wrong On the other had it still will runs the fake command as root with the password or maybe I'm a little paranoid. |
If someone can write into I think you're being paranoid (or not enough :p) But if that's important to you, change the config to set a known PATH for that rule! |
I think it's a reasonable concern, so I'll be changing it in my own config. But I'm not gonna fall for some random guy on the internet telling me to save a file in my exec path, so It's not me that need the config, but better safe than sorry. EDIT : Thanks for your time. I'll leave the issue open in case you have unfinished business. |
I can't close it, that'd be up to Duncaen |
doas should prefer executables in system PATH over local (in $HOME)
or maybe it should ignore the local paths?
worse case example
assume this line is in the doas.confpermit nopass user as root cmd poweroff
and
~/.local/bin
is in the user's exec PATHIf you create a "Fake" poweroff executable in ~/.local/bin
then run the command
doas poweroff
it will run the fake poweroff as root instead of the real one
Things to consider:
~/.local/bin does not require root access to write
no password is requested thanks to the nopass configuration.*Edited due to inaccuracy. See below
Addition : This does not apply to commands specifically specified with nopass
The text was updated successfully, but these errors were encountered: