- dugsong@cvs.openbsd.org 2001/06/26 17:41:49
[servconf.c]
#include <kafs.h>
+ - markus@cvs.openbsd.org 2001/06/26 20:14:11
+ [key.c key.h ssh.c sshconnect1.c sshconnect2.c]
+ add smartcard support to the client, too (now you can use both
+ the agent and the client).
+ - 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.
20010629
- (bal) Removed net_aton() since we don't use it any more
*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.71 2001/06/25 08:25:39 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.72 2001/06/27 02:12:52 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
/* XXX */
extern Kex *xxx_kex;
+static Authctxt *xxx_authctxt;
static Buffer stdin_buffer; /* Buffer for stdin data. */
static Buffer stdout_buffer; /* Buffer for stdout data. */
}
void
-server_loop2(void)
+server_loop2(Authctxt *authctxt)
{
fd_set *readset = NULL, *writeset = NULL;
int rekeying = 0, max_fd, status;
connection_out = packet_get_connection_out();
max_fd = MAX(connection_in, connection_out);
+ xxx_authctxt = authctxt;
server_init_dispatch();
error("server_request_session: channel_new failed");
return NULL;
}
- if (session_open(c->self) != 1) {
+ if (session_open(xxx_authctxt, c->self) != 1) {
debug("session open failed, free channel %d", c->self);
channel_free(c);
return NULL;
-/* $OpenBSD: serverloop.h,v 1.4 2001/06/26 17:27:24 markus Exp $ */
+/* $OpenBSD: serverloop.h,v 1.5 2001/06/27 02:12:53 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
#define SERVERLOOP_H
void server_loop(pid_t, int, int, int);
-void server_loop2(void);
+void server_loop2(Authctxt *);
#endif
*/
#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"
/* 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);
}
int
-session_open(int chanid)
+session_open(Authctxt *authctxt, int chanid)
{
Session *s = session_new();
debug("session_open: channel %d", chanid);
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);
static void
do_authenticated2(Authctxt *authctxt)
{
- server_loop2();
+ server_loop2(authctxt);
}
-/* $OpenBSD: session.h,v 1.9 2001/06/26 17:27:24 markus Exp $ */
+/* $OpenBSD: session.h,v 1.10 2001/06/27 02:12:54 markus Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
void do_authenticated(Authctxt *);
-int session_open(int);
+int session_open(Authctxt*, int);
void session_input_channel_req(int, void *);
void session_close_by_pid(pid_t, int);
void session_close_by_channel(int, void *);