<markm@swoon.net>
- (djm) Search for -lcrypt on FreeBSD too
- (djm) fatal() on OpenSSL version mismatch
+ - (djm) Move PAM init to after fork for non-Solaris derived PAMs
20010226
- (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again.
session_proctitle(s);
-#ifdef USE_PAM
+#if defined(USE_PAM) && defined(PAM_SUN_CODEBASE)
+ /* Solaris-derived PAMs don't like doing this after the fork() */
do_pam_setcred();
#endif /* USE_PAM */
ptyfd = s->ptyfd;
ttyfd = s->ttyfd;
-#ifdef USE_PAM
+#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, s->tty);
do_pam_setcred();
-#endif /* USE_PAM */
+#endif
/* Fork the child. */
if ((pid = fork()) == 0) {
#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, s->tty);
+ do_pam_setcred();
+#endif
/* login(1) is only called if we execute the login shell */
if (options.use_login && command != NULL)