summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
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 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)
487 487
488 session_proctitle(s); 488 session_proctitle(s);
489 489
490#if defined(USE_PAM) && defined(PAM_SUN_CODEBASE) 490#if defined(USE_PAM)
491 /* Solaris-derived PAMs don't like doing this after the fork() */
492 do_pam_setcred(); 491 do_pam_setcred();
493#endif /* USE_PAM */ 492#endif /* USE_PAM */
494 493
@@ -604,8 +603,7 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw)
604 ptyfd = s->ptyfd; 603 ptyfd = s->ptyfd;
605 ttyfd = s->ttyfd; 604 ttyfd = s->ttyfd;
606 605
607#if defined(USE_PAM) && defined(PAM_SUN_CODEBASE) 606#if defined(USE_PAM)
608 /* Solaris-derived PAMs don't like doing this after the fork() */
609 do_pam_session(pw->pw_name, s->tty); 607 do_pam_session(pw->pw_name, s->tty);
610 do_pam_setcred(); 608 do_pam_setcred();
611#endif 609#endif
@@ -1034,12 +1032,6 @@ do_child(const char *command, struct passwd * pw, const char *term,
1034#endif /* WITH_IRIX_ARRAY */ 1032#endif /* WITH_IRIX_ARRAY */
1035#endif /* WITH_IRIX_JOBS */ 1033#endif /* WITH_IRIX_JOBS */
1036 1034
1037#if defined(USE_PAM) && !defined(PAM_SUN_CODEBASE)
1038 /* Solaris-derived PAMs don't like doing this after the fork() */
1039 do_pam_session(pw->pw_name, ttyname);
1040 do_pam_setcred();
1041#endif
1042
1043 /* login(1) is only called if we execute the login shell */ 1035 /* login(1) is only called if we execute the login shell */
1044 if (options.use_login && command != NULL) 1036 if (options.use_login && command != NULL)
1045 options.use_login = 0; 1037 options.use_login = 0;