Avoid terminating the PAM library in the forked child. This is done later
in the parent after closing the PAM session. This fixes http://bugs.debian.org/412061. Debian patch 405_su_no_pam_end_before_exec.
This commit is contained in:
7
src/su.c
7
src/su.c
@ -183,7 +183,12 @@ static void run_shell (const char *shellstr, char *args[], int doshell,
|
||||
|
||||
child = fork ();
|
||||
if (child == 0) { /* child shell */
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
/*
|
||||
* PAM_DATA_SILENT is not supported by some modules, and
|
||||
* there is no strong need to clean up the process space's
|
||||
* memory since we will either call exec or exit.
|
||||
pam_end (pamh, PAM_SUCCESS | PAM_DATA_SILENT);
|
||||
*/
|
||||
|
||||
if (doshell)
|
||||
(void) shell (shellstr, (char *) args[0], envp);
|
||||
|
Reference in New Issue
Block a user