Solaris and Latest snapshot (2001-02-21)

Kevin Steves stevesk at sweden.hp.com
Thu Feb 22 03:54:19 EST 2001


On Tue, 20 Feb 2001 mouring at etoh.eviladmin.org wrote:
: There is only two sets of pam patches around that date.  One is a
: suggestion to clean up PAM space.  Which I can't see any fault.  And this
: one which stated it was for solaris.  Can you apply this reverse and see
: if this gets us closer to fixing this?  Or if the problem still exists?

hp-ux broke with that.  i just commited the following, which takes us
back to before the first pam change:

 - (stevesk) session.c: back out to where we were before:
    - (djm) Move PAM session initialisation until after fork in sshd. Patch
      from Nalin Dahyabhai <nalin at redhat.com>

i have done rudimentary testing on hp-ux and redhat.  can solaris users
test this?  we can troubleshoot after p2.

Index: session.c
===================================================================
RCS file: /var/cvs/openssh/session.c,v
retrieving revision 1.80
diff -u -r1.80 session.c
--- session.c	2001/02/21 05:53:33	1.80
+++ session.c	2001/02/21 16:28:40
@@ -481,6 +481,10 @@

 	session_proctitle(s);

+#ifdef USE_PAM
+	do_pam_setcred();
+#endif /* USE_PAM */
+
 	/* Fork the child. */
 	if ((pid = fork()) == 0) {
 		/* Child.  Reinitialize the log since the pid has changed. */
@@ -593,6 +597,11 @@
 	ptyfd = s->ptyfd;
 	ttyfd = s->ttyfd;

+#ifdef USE_PAM
+	do_pam_session(pw->pw_name, s->tty);
+	do_pam_setcred();
+#endif /* USE_PAM */
+
 	/* Fork the child. */
 	if ((pid = fork()) == 0) {
 		/* Child.  Reinitialize the log because the pid has changed. */
@@ -1142,11 +1151,6 @@
 #ifdef HAVE_LOGIN_CAP
 	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. */







More information about the openssh-unix-dev mailing list