[sudo-workers] [PATCH RFC RESEND] New option: root_add_path
petr.uzel at suse.cz
Tue May 17 09:48:29 EDT 2011
I did not get any feedback on this, so trying to resend; this time
to sudo-users. Original mail:
The attached patch is an attempt to address the following:
$ sudo fdisk -l
sudo: fdisk: command not found
which happens if fdisk is installed in a directory not in a users
PATH. The idea is to add new option, root_add_path, with which
additional directories (besides what's in invoking users PATH) could
be specified to be searched when looking up full path to the command.
There might be reasons why distributions do not add /sbin,
/usr/sbin to default PATH for non-root users, e.g. not to pollute
shell completion results with commands not supposed to be run
as regular user.
I did not find any way how to achieve this without introducing new
1) root_add_path is probably a bad name for this option, but I
couldn't invent anything more descriptive and sufficiently short.
2) for now, the root_add_path is simply appended to users path. While
this works in theory, it would be probably better and cleaner to
'merge' the paths (remove duplicate directories, if there are any).
IRC: ptr_uzl @ freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4114 bytes
Desc: not available
More information about the sudo-workers