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.
	* man/login.1.xml: PATH and SUPATH are now used both when PAM support
	is disabled and enabled.
This commit is contained in:
nekral-guest 2007-12-26 23:15:43 +00:00
parent b44a6c316d
commit 5cbc86b7d9
4 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-12-26 Nicolas François <nicolas.francois@centraliens.net>
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 <nicolas.francois@centraliens.net> 2007-12-26 Nicolas François <nicolas.francois@centraliens.net>
Merge Debian's patch 496_login_init_session Merge Debian's patch 496_login_init_session

3
NEWS
View File

@ -22,6 +22,9 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED
* If started as init, start a new session. * If started as init, start a new session.
- sulogin - sulogin
* If started as init, start a new session. * 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 shadow-4.0.18.2 -> shadow-4.1.0 09-12-2008

View File

@ -186,8 +186,8 @@ void setup_env (struct passwd *info)
{ {
#ifndef USE_PAM #ifndef USE_PAM
char *envf; char *envf;
char *cp;
#endif #endif
char *cp;
/* /*
* Change the current working directory to be the home directory * 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 ("USER", info->pw_name);
addenv ("LOGNAME", info->pw_name); addenv ("LOGNAME", info->pw_name);
#ifndef USE_PAM
/* /*
* Create the PATH environmental variable and export it. * Create the PATH environmental variable and export it.
*/ */
@ -260,6 +259,7 @@ void setup_env (struct passwd *info)
addenv ("PATH", cp); addenv ("PATH", cp);
} }
#ifndef USE_PAM
/* /*
* Create the MAIL environmental variable and export it. login.defs * Create the MAIL environmental variable and export it. login.defs
* knows the prefix. * knows the prefix.

View File

@ -242,8 +242,8 @@
&CONSOLE_GROUPS; &CONSOLE_GROUPS;
&DEFAULT_HOME; &DEFAULT_HOME;
<phrase condition="no_pam">&ENV_HZ;</phrase> <phrase condition="no_pam">&ENV_HZ;</phrase>
<phrase condition="no_pam">&ENV_PATH;</phrase> <phrase>&ENV_PATH;</phrase>
<phrase condition="no_pam">&ENV_SUPATH;</phrase> <phrase>&ENV_SUPATH;</phrase>
&ENV_TZ; &ENV_TZ;
&ENVIRON_FILE; &ENVIRON_FILE;
&ERASECHAR; &ERASECHAR;