summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-28 11:46:11 +1100
committerDamien Miller <djm@mindrot.org>2001-02-28 11:46:11 +1100
commitc594633b492b94825c60330046a3648a2b7be565 (patch)
tree3160a959d89c8730afcfc18426d770a90627dca1 /session.c
parent4df5c76c2b217b3b487004731a13808ca6326bab (diff)
- (djm) Fully revert PAM session patch. All PAM session init is now done
before the final fork().
Diffstat (limited to 'session.c')
-rw-r--r--session.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/session.c b/session.c
index be0cdf79..2fa0700f 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;