diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.96 2001/06/26 16:15:24 dugsong Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.97 2001/06/27 02:12:53 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -547,9 +547,9 @@ do_exec_pty(Session *s, const char *command) | |||
547 | 547 | ||
548 | /* Fork the child. */ | 548 | /* Fork the child. */ |
549 | if ((pid = fork()) == 0) { | 549 | if ((pid = fork()) == 0) { |
550 | |||
550 | /* Child. Reinitialize the log because the pid has changed. */ | 551 | /* Child. Reinitialize the log because the pid has changed. */ |
551 | log_init(__progname, options.log_level, options.log_facility, log_stderr); | 552 | log_init(__progname, options.log_level, options.log_facility, log_stderr); |
552 | |||
553 | /* Close the master side of the pseudo tty. */ | 553 | /* Close the master side of the pseudo tty. */ |
554 | close(ptyfd); | 554 | close(ptyfd); |
555 | 555 | ||
@@ -1562,7 +1562,7 @@ session_dump(void) | |||
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | int | 1564 | int |
1565 | session_open(int chanid) | 1565 | session_open(Authctxt *authctxt, int chanid) |
1566 | { | 1566 | { |
1567 | Session *s = session_new(); | 1567 | Session *s = session_new(); |
1568 | debug("session_open: channel %d", chanid); | 1568 | debug("session_open: channel %d", chanid); |
@@ -1570,7 +1570,8 @@ session_open(int chanid) | |||
1570 | error("no more sessions"); | 1570 | error("no more sessions"); |
1571 | return 0; | 1571 | return 0; |
1572 | } | 1572 | } |
1573 | s->pw = auth_get_user(); | 1573 | s->authctxt = authctxt; |
1574 | s->pw = authctxt->pw; | ||
1574 | if (s->pw == NULL) | 1575 | if (s->pw == NULL) |
1575 | fatal("no user for session %d", s->self); | 1576 | fatal("no user for session %d", s->self); |
1576 | debug("session_open: session %d: link with channel %d", s->self, chanid); | 1577 | debug("session_open: session %d: link with channel %d", s->self, chanid); |
@@ -2052,5 +2053,5 @@ session_setup_x11fwd(Session *s) | |||
2052 | static void | 2053 | static void |
2053 | do_authenticated2(Authctxt *authctxt) | 2054 | do_authenticated2(Authctxt *authctxt) |
2054 | { | 2055 | { |
2055 | server_loop2(); | 2056 | server_loop2(authctxt); |
2056 | } | 2057 | } |