diff --git a/ChangeLog b/ChangeLog index b17507e4..63ffd0e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-01 Nicolas François + + * NEWS, man/login.defs.d/ENV_SUPATH.xml, libmisc/setupenv.c: + Harmonize other paths and documentation with previous + change. + 2009-11-01 Michel Hermier * src/su.c: Set the default ENV_SUPATH to diff --git a/NEWS b/NEWS index 0fe7ff95..064e6bdd 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ shadow-4.1.4.2 -> shadow-4.1.4.3 UNRELEASED * When su receives a signal, wait for the child to terminate (after sending a SIGTERM), and kill it only if it did not terminate by itself. No delay will be enforced if the child cooperates. + * Default ENV_SUPATH is /sbin:/bin:/usr/sbin:/usr/bin *** translation * Updated Czech translation. diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index 7d6f7dea..95dfd926 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -265,7 +265,7 @@ void setup_env (struct passwd *info) if (NULL == cp) { /* not specified, use a minimal default */ - addenv ("PATH=/bin:/usr/bin", NULL); + addenv ((pwent.pw_uid == 0) ? "PATH=/sbin:/bin:/usr/sbin:/usr/bin" : "PATH=/bin:/usr/bin", NULL); } else if (strchr (cp, '=')) { /* specified as name=value (PATH=...) */ addenv (cp, NULL); diff --git a/man/login.defs.d/ENV_SUPATH.xml b/man/login.defs.d/ENV_SUPATH.xml index 9a48fc59..d3731dae 100644 --- a/man/login.defs.d/ENV_SUPATH.xml +++ b/man/login.defs.d/ENV_SUPATH.xml @@ -1,7 +1,7 @@