]> git.pld-linux.org Git - packages/coreutils.git/commitdiff
- Add a "-l" to the name passed to PAM if this is a login simulation
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 27 Mar 2007 15:24:52 +0000 (15:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    coreutils-split-pam.patch -> 1.1

coreutils-split-pam.patch [new file with mode: 0644]

diff --git a/coreutils-split-pam.patch b/coreutils-split-pam.patch
new file mode 100644 (file)
index 0000000..4d36447
--- /dev/null
@@ -0,0 +1,30 @@
+diff -uNrp -x '*~' coreutils-5.97-orig/src/su.c coreutils-5.97/src/su.c
+--- coreutils-5.97-orig/src/su.c       2006-07-13 12:14:40.000000000 +0100
++++ coreutils-5.97/src/su.c    2006-07-13 12:24:33.000000000 +0100
+@@ -131,11 +131,15 @@
+ #include "error.h"
+-/* The official name of this program (e.g., no `g' prefix).  */
++/* The official name of this program (e.g., no `g' prefix).
++ * - Add a "-l" to the name passed to PAM if this is a login simulation
++ */
+ #ifndef RUNUSER
+ #define PROGRAM_NAME "su"
++#define PROGRAM_NAME_L "su-l"
+ #else
+ #define PROGRAM_NAME "runuser"
++#define PROGRAM_NAME_L "runuser-l"
+ #endif
+ #ifndef AUTHORS
+@@ -310,7 +314,8 @@ correct_password (const struct passwd *p
+ #ifdef USE_PAM
+   struct passwd *caller;
+   char *tty_name, *ttyn;
+-  retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
++  retval = pam_start(simulate_login ? PROGRAM_NAME_L : PROGRAM_NAME,
++                   pw->pw_name, &conv, &pamh);
+   PAM_BAIL_P;
+ #ifndef RUNUSER
This page took 0.026849 seconds and 4 git commands to generate.