diff --git a/ChangeLog b/ChangeLog index 3119ade3..974e92c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-26 Nicolas François + + Merge Debian's patch 451_login_PATH + * NEWS, libmisc/setupenv.c: Export PATH according to ENV_PATH and + ENV_SUPATH, as for su. This impacts login. + 2007-12-26 Nicolas François Merge Debian's patch 496_login_init_session diff --git a/NEWS b/NEWS index 45e2b9e3..0a740510 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,9 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED * If started as init, start a new session. - sulogin * If started as init, start a new session. +- login + * Use PATH and SUPATH to set the PATH environment variable, even when + support for PAM is enabled. shadow-4.0.18.2 -> shadow-4.1.0 09-12-2008 diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index e98748c5..2f913ade 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -186,8 +186,8 @@ void setup_env (struct passwd *info) { #ifndef USE_PAM char *envf; - char *cp; #endif + char *cp; /* * Change the current working directory to be the home directory @@ -242,7 +242,6 @@ void setup_env (struct passwd *info) addenv ("USER", info->pw_name); addenv ("LOGNAME", info->pw_name); -#ifndef USE_PAM /* * Create the PATH environmental variable and export it. */ @@ -260,6 +259,7 @@ void setup_env (struct passwd *info) addenv ("PATH", cp); } +#ifndef USE_PAM /* * Create the MAIL environmental variable and export it. login.defs * knows the prefix. diff --git a/man/login.1.xml b/man/login.1.xml index 8d4e6283..e577bd94 100644 --- a/man/login.1.xml +++ b/man/login.1.xml @@ -242,8 +242,8 @@ &CONSOLE_GROUPS; &DEFAULT_HOME; &ENV_HZ; - &ENV_PATH; - &ENV_SUPATH; + &ENV_PATH; + &ENV_SUPATH; &ENV_TZ; &ENVIRON_FILE; &ERASECHAR;