OpenDoas icon indicating copy to clipboard operation
OpenDoas copied to clipboard

Incorrect ordering of paths in safepath

Open TheDcoder opened this issue 2 years ago • 2 comments

Hello,

Please fix safepath so that /usr/local/* paths come before their /usr/* counterparts, this is the de-facto standard in all other applications.

This prevents use-cases where executables in /usr/local/bin are supposed to override those in /usr/bin.

Thanks :)

TheDcoder avatar Jun 06 '23 06:06 TheDcoder

Looks like this is a remnant from OpenBSD's implementation where /usr/local does come after /usr since all the ports are installed into /usr/local... or so I have been told by someone on IRC, I don't use BSD.

This should be corrected for the Linux version of OpenDoas.

TheDcoder avatar Jun 06 '23 07:06 TheDcoder

For anyone experiencing the issue, you can work around it like this:

# Default wheel privileges
permit setenv {PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin} :wheel
# setenv required: https://github.com/Duncaen/OpenDoas/issues/117

TheDcoder avatar Jun 06 '23 07:06 TheDcoder