]> granicus.if.org Git - shadow/commitdiff
Merge Debian's patch 451_login_PATH
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 26 Dec 2007 23:15:43 +0000 (23:15 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 26 Dec 2007 23:15:43 +0000 (23:15 +0000)
* 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.

ChangeLog
NEWS
libmisc/setupenv.c
man/login.1.xml

index 3119ade35914f0ace3d9ad4aa5ae24bcb533163c..974e92c175ff1d0d59dec06509d5d5f508f0d83d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        Merge Debian's patch 496_login_init_session
diff --git a/NEWS b/NEWS
index 45e2b9e3f2ae910f685386e6317ce66fc746f662..0a740510c5a58325f37dda232478f5d87d35cde8 100644 (file)
--- 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
 
index e98748c5874e561f6c03db45f33987848befec3a..2f913adea8c6d482b3078dd044bd94e09ab4b893 100644 (file)
@@ -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.
index 8d4e6283b7274056564b4c353c9602ce2a75c25e..e577bd9440912281778e4ccae145bccbebd62b9f 100644 (file)
       &CONSOLE_GROUPS;
       &DEFAULT_HOME;
       <phrase condition="no_pam">&ENV_HZ;</phrase>
-      <phrase condition="no_pam">&ENV_PATH;</phrase>
-      <phrase condition="no_pam">&ENV_SUPATH;</phrase>
+      <phrase>&ENV_PATH;</phrase>
+      <phrase>&ENV_SUPATH;</phrase>
       &ENV_TZ;
       &ENVIRON_FILE;
       &ERASECHAR;