Skip to content

doas should prefer executables in system PATH over local #128

@JWMKit

Description

@JWMKit

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.conf
permit nopass user as root cmd poweroff

and ~/.local/bin is in the user's exec PATH

If 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions