=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- src/usr.bin/ssh/session.c 2001/06/26 16:15:24 1.96 +++ src/usr.bin/ssh/session.c 2001/06/27 02:12:53 1.97 @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.96 2001/06/26 16:15:24 dugsong Exp $"); +RCSID("$OpenBSD: session.c,v 1.97 2001/06/27 02:12:53 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -494,9 +494,9 @@ /* Fork the child. */ if ((pid = fork()) == 0) { + /* Child. Reinitialize the log because the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); - /* Close the master side of the pseudo tty. */ close(ptyfd); @@ -1189,7 +1189,7 @@ } int -session_open(int chanid) +session_open(Authctxt *authctxt, int chanid) { Session *s = session_new(); debug("session_open: channel %d", chanid); @@ -1197,7 +1197,8 @@ error("no more sessions"); return 0; } - s->pw = auth_get_user(); + s->authctxt = authctxt; + s->pw = authctxt->pw; if (s->pw == NULL) fatal("no user for session %d", s->self); debug("session_open: session %d: link with channel %d", s->self, chanid); @@ -1675,5 +1676,5 @@ static void do_authenticated2(Authctxt *authctxt) { - server_loop2(); + server_loop2(authctxt); }