[Pkg-shadow-devel] [PATCH] su(1): document PATH handling when --preserve-environment
Nicolas François
nicolas.francois at centraliens.net
Thu Jun 11 20:52:05 UTC 2009
On Thu, Jun 04, 2009 at 10:50:36PM +0200, nicolas.francois at centraliens.net wrote:
> Hello,
>
> On Sun, May 31, 2009 at 12:37:39AM -0400, vapier at gentoo.org wrote:
> >
> > - <para>Preserve the current environment.</para>
> > + <para>
> > + Preserve the current environment (except for <envar>$PATH</envar>
> > + as that is still reset per the configuration).
> > + </para>
>
> I took the opportunity to document other environment variables handling:
>
> == PAM version ============================================================
> -m, -p, --preserve-environment
> Preserve the current environment, except for:
>
> $PATH
> reset according to the /etc/login.defs options ENV_PATH or
> ENV_SUPATH (see below);
>
> $IFS
> reset to “<space><tab><newline>”, if it was set.
>
> If the target user has a restricted shell, this option has no
> effect (unless su is called by root).
>
> Note that the default behavior for the environment is the
> following:
>
> The $HOME, $SHELL, $USER, $LOGNAME, $PATH, and $IFS environment
> variables are reset.
This was still not correct as the default behavior is to copy most of the
environment variables.
I've made another change to su(1).
Best Regards,
--
Nekral
More information about the Pkg-shadow-devel
mailing list