summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:53:53 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:53:53 +0000
commitbddd551e1143ba2b7bf0cd453c15b97817bc917d (patch)
tree269daec870fb1889543b6cc73ad3c130da631571 /session.c
parentc5b680018b1fbc58ad2316199693e2805dadf638 (diff)
- markus@cvs.openbsd.org 2001/06/27 02:12:54
[serverloop.c serverloop.h session.c session.h] quick hack to make ssh2 work again.
Diffstat (limited to 'session.c')
-rw-r--r--session.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/session.c b/session.c
index 5a6afa7ec..818f3211b 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.96 2001/06/26 16:15:24 dugsong Exp $"); 36RCSID("$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
1564int 1564int
1565session_open(int chanid) 1565session_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)
2052static void 2053static void
2053do_authenticated2(Authctxt *authctxt) 2054do_authenticated2(Authctxt *authctxt)
2054{ 2055{
2055 server_loop2(); 2056 server_loop2(authctxt);
2056} 2057}