[Pkg-shadow-devel] Fix default path for root with "su"

Nicolas François nicolas.francois at centraliens.net
Sun Nov 1 17:01:15 UTC 2009


Hello,

On Sun, Nov 01, 2009 at 11:28:56AM +0100, michel.hermier at gmail.com wrote:
> 
> According to the manual:
> 
>     The current environment is passed to the new shell. The value of
> $PATH is reset to /bin:/usr/bin for normal users, or
>     /sbin:/bin:/usr/sbin:/usr/bin for the superuser. This may be
> changed with the ENV_PATH and ENV_SUPATH definitions in
> /etc/login.defs.
> 
> So for me when doing a simple "su" invocation the $PATH should be
> "/sbin:/bin:/usr/sbin:/usr/bin" while "su foouser" should return
> "/bin:/usr/bin" when /etc/login.defs is not modified. But it is not
> the case, we unconditionally get "/bin:/usr/bin". Here is a patch that
> correct this behavior.

Thanks for the patch. It is now applied on the shadow's repository.
I also changed the documentation of ENV_SUPATH and libmisc/setupenv.c

Best Regards,
-- 
Nekral



More information about the Pkg-shadow-devel mailing list