From c594633b492b94825c60330046a3648a2b7be565 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 28 Feb 2001 11:46:11 +1100 Subject: - (djm) Fully revert PAM session patch. All PAM session init is now done before the final fork(). --- session.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'session.c') diff --git a/session.c b/session.c index be0cdf795..2fa0700f7 100644 --- a/session.c +++ b/session.c @@ -487,8 +487,7 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw) session_proctitle(s); -#if defined(USE_PAM) && defined(PAM_SUN_CODEBASE) - /* Solaris-derived PAMs don't like doing this after the fork() */ +#if defined(USE_PAM) do_pam_setcred(); #endif /* USE_PAM */ @@ -604,8 +603,7 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw) ptyfd = s->ptyfd; ttyfd = s->ttyfd; -#if defined(USE_PAM) && defined(PAM_SUN_CODEBASE) - /* Solaris-derived PAMs don't like doing this after the fork() */ +#if defined(USE_PAM) do_pam_session(pw->pw_name, s->tty); do_pam_setcred(); #endif @@ -1034,12 +1032,6 @@ do_child(const char *command, struct passwd * pw, const char *term, #endif /* WITH_IRIX_ARRAY */ #endif /* WITH_IRIX_JOBS */ -#if defined(USE_PAM) && !defined(PAM_SUN_CODEBASE) - /* Solaris-derived PAMs don't like doing this after the fork() */ - do_pam_session(pw->pw_name, ttyname); - do_pam_setcred(); -#endif - /* login(1) is only called if we execute the login shell */ if (options.use_login && command != NULL) options.use_login = 0; -- cgit v1.2.3