]> granicus.if.org Git - shadow/commitdiff
* src/su.c: shell's name must be -su when a su fakes a login.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 30 Mar 2010 21:32:36 +0000 (21:32 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 30 Mar 2010 21:32:36 +0000 (21:32 +0000)
ChangeLog
src/su.c

index fbb3765395c685d16449eae2b7aea0be1e0d4546..872f24d3ea81b1dc69d1443a648dcaa878b18e7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-30  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/su.c: shell's name must be -su when a su fakes a login.
+
 2010-03-30  Nicolas François  <nicolas.francois@centraliens.net>
 
        * NEWS, configure.in, libmisc/copydir.c, man/useradd.8.xml,
index 837e76c39f8bc536c3b384df54c44a94bf25529f..a844edc8bf136e49a4391d99413cb4889070f1f5 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -1021,7 +1021,7 @@ int main (int argc, char **argv)
                 * Use the shell and create an argv
                 * with the rest of the command line included.
                 */
-               argv[-1] = shellstr;
+               argv[-1] = cp;
 #ifndef USE_PAM
                execve_shell (shellstr, &argv[-1], environ);
                err = errno;