version 1.96, 2001/06/26 16:15:24 |
version 1.97, 2001/06/27 02:12:53 |
|
|
|
|
/* Fork the child. */ |
/* Fork the child. */ |
if ((pid = fork()) == 0) { |
if ((pid = fork()) == 0) { |
|
|
/* Child. Reinitialize the log because the pid has changed. */ |
/* Child. Reinitialize the log because the pid has changed. */ |
log_init(__progname, options.log_level, options.log_facility, log_stderr); |
log_init(__progname, options.log_level, options.log_facility, log_stderr); |
|
|
/* Close the master side of the pseudo tty. */ |
/* Close the master side of the pseudo tty. */ |
close(ptyfd); |
close(ptyfd); |
|
|
|
|
} |
} |
|
|
int |
int |
session_open(int chanid) |
session_open(Authctxt *authctxt, int chanid) |
{ |
{ |
Session *s = session_new(); |
Session *s = session_new(); |
debug("session_open: channel %d", chanid); |
debug("session_open: channel %d", chanid); |
|
|
error("no more sessions"); |
error("no more sessions"); |
return 0; |
return 0; |
} |
} |
s->pw = auth_get_user(); |
s->authctxt = authctxt; |
|
s->pw = authctxt->pw; |
if (s->pw == NULL) |
if (s->pw == NULL) |
fatal("no user for session %d", s->self); |
fatal("no user for session %d", s->self); |
debug("session_open: session %d: link with channel %d", s->self, chanid); |
debug("session_open: session %d: link with channel %d", s->self, chanid); |
|
|
static void |
static void |
do_authenticated2(Authctxt *authctxt) |
do_authenticated2(Authctxt *authctxt) |
{ |
{ |
server_loop2(); |
server_loop2(authctxt); |
} |
} |