diff options
author | Damien Miller <djm@mindrot.org> | 2001-02-15 11:32:15 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-02-15 11:32:15 +1100 |
commit | e8b5b04521f33d868ac3301802e3dab1f57588fd (patch) | |
tree | 9dbf00ddf957dbae2955e055e3fc1da79a8f6efb /session.c | |
parent | 7fafa5ccbe332d3c3faabd75b3354f8d149e6d09 (diff) |
- (djm) Move PAM session setup back to before setuid to user. Fixes
problems on Solaris-derived PAMs.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1016,6 +1016,10 @@ 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) @@ -1129,11 +1133,6 @@ 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()) { |