Skip to content

Commit

Permalink
Avoid terminating the PAM library in the forked child. This is done l…
Browse files Browse the repository at this point in the history
…ater

in the parent after closing the PAM session.
This fixes http://bugs.debian.org/412061.
Debian patch 405_su_no_pam_end_before_exec.
  • Loading branch information
nekral-guest committed Nov 17, 2007
1 parent 7503c8a commit 0fd1ed4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>

* NEWS, src/su.c: 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.

2007-11-17 Nicolas François <nicolas.francois@centraliens.net>

* man/newgrp.1.xml: Mention sg in the newgrp manpage.
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ shadow-4.0.18.1 -> shadow-4.0.18.2 UNRELEASED
addition* to editing the password field. Debian patch 494_passwd_lock.
- pwck: Remove the SHADOWPWD preprocessor check. Some check for /etc/shadow
were always missing.
- su: Avoid terminating the PAM library in the forked child. This is done
later in the parent after closing the PAM session.

shadow-4.0.18.1 -> shadow-4.0.18.2 28-10-2007

Expand Down
7 changes: 6 additions & 1 deletion src/su.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0fd1ed4

Please sign in to comment.