FS#64492 - [util-linux] setpriv sets wrong PATH
Attached to Project:
Arch Linux
Opened by lukpod (lukpod) - Thursday, 14 November 2019, 03:34 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 08 December 2019, 11:19 GMT
Opened by lukpod (lukpod) - Thursday, 14 November 2019, 03:34 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 08 December 2019, 11:19 GMT
|
Details
PATH set by setpriv contains /sbin, /bin, /usr/sbin which
are symbolic links.
# setpriv --reset-env sh -c 'echo $PATH' /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # setpriv --reset-env --ruid 1000 sh -c 'echo $PATH' /usr/local/bin:/bin:/usr/bin https://www.mankier.com/1/setpriv#--reset-env |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 08 December 2019, 11:19 GMT
Reason for closing: Fixed
Additional comments about closing: util-linux-2.34-8
Sunday, 08 December 2019, 11:19 GMT
Reason for closing: Fixed
Additional comments about closing: util-linux-2.34-8
This configure option is missing from the PKGBUILD:
--enable-usrdir-path
From configure --help:
use only /usr paths in PATH env. variable (recommended on systems with /bin -> /usr/bin symlinks)
$ ./configure --help
...
--sbindir=DIR
system admin executables [EPREFIX/sbin]
...
--enable-usrdir-path
use only /usr paths in PATH env. variable (recommended on systems with /bin -> /usr/bin symlinks)
Ok, then what's the defect? What incorrect behavior is setpriv exhibiting?
https://github.com/karelzak/util-linux/issues/110
I'm not sure when setpriv might be used with such tools (from memory, cmake is one of them) but either way it's nice to avoid references to /bin just in case. People should only have those broken tools behaving in a broken fashion, when *they* have overridden the distro $PATH, not when a distro-provided tool overrides their $PATH.
And, indeed, the current version of util-linux in testing now behaves properly as far as I can tell. Yay.