From 94bce40720e91d184ae22272a1537edffb65f945 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Wed, 21 Feb 2001 05:53:33 +0000 Subject: - (bal) Reverted out of 2001/02/15 patch by djm below because it breaks Solaris. - (djm) Move PAM session setup back to before setuid to user. fixes problems on Solaris-drived PAMs. --- session.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'session.c') diff --git a/session.c b/session.c index e862c6504..de8127f79 100644 --- a/session.c +++ b/session.c @@ -1017,10 +1017,6 @@ do_child(const char *command, struct passwd * pw, const char *term, #endif /* WITH_IRIX_ARRAY */ #endif /* WITH_IRIX_JOBS */ -#ifdef USE_PAM - do_pam_session(pw->pw_name, ttyname); - do_pam_setcred(); -#endif /* USE_PAM */ /* login(1) is only called if we execute the login shell */ if (options.use_login && command != NULL) @@ -1147,6 +1143,11 @@ do_child(const char *command, struct passwd * pw, const char *term, shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); #endif +#ifdef USE_PAM + do_pam_session(pw->pw_name, ttyname); + do_pam_setcred(); +#endif /* USE_PAM */ + #ifdef AFS /* Try to get AFS tokens for the local cell. */ if (k_hasafs()) { -- cgit v1.2.3