]> git.pld-linux.org Git - packages/coreutils.git/blob - coreutils-split-pam.patch
- partially update from fedora, fixes test suite
[packages/coreutils.git] / coreutils-split-pam.patch
1 diff -uNrp -x '*~' coreutils-5.97-orig/src/su.c coreutils-5.97/src/su.c
2 --- coreutils-5.97-orig/src/su.c        2006-07-13 12:14:40.000000000 +0100
3 +++ coreutils-5.97/src/su.c     2006-07-13 12:24:33.000000000 +0100
4 @@ -131,11 +131,15 @@
5  
6  #include "error.h"
7  
8 -/* The official name of this program (e.g., no `g' prefix).  */
9 +/* The official name of this program (e.g., no `g' prefix).
10 + * - Add a "-l" to the name passed to PAM if this is a login simulation
11 + */
12  #ifndef RUNUSER
13  #define PROGRAM_NAME "su"
14 +#define PROGRAM_NAME_L "su-l"
15  #else
16  #define PROGRAM_NAME "runuser"
17 +#define PROGRAM_NAME_L "runuser-l"
18  #endif
19  
20  #ifndef AUTHORS
21 @@ -310,7 +314,8 @@ correct_password (const struct passwd *p
22  #ifdef USE_PAM
23    struct passwd *caller;
24    char *tty_name, *ttyn;
25 -  retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
26 +  retval = pam_start(simulate_login ? PROGRAM_NAME_L : PROGRAM_NAME,
27 +                    pw->pw_name, &conv, &pamh);
28    PAM_BAIL_P;
29  
30  #ifndef RUNUSER
This page took 0.063611 seconds and 3 git commands to generate.