]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2001/06/27 02:12:54
authormouring <mouring>
Wed, 4 Jul 2001 04:53:53 +0000 (04:53 +0000)
committermouring <mouring>
Wed, 4 Jul 2001 04:53:53 +0000 (04:53 +0000)
     [serverloop.c serverloop.h session.c session.h]
     quick hack to make ssh2 work again.

ChangeLog
serverloop.c
serverloop.h
session.c
session.h

index 96aeef348ab753624afb8ef1d358e59ee129a25c..f9e7e2c034da6aaf7784d1970e6b56a06c573a3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - 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
index 2eb8603d1565092638603371521c8875d2dd1b70..ecc7763a4aa1c22296fef6e6b3f13ad5af7ff608 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #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"
@@ -59,6 +59,7 @@ extern ServerOptions options;
 
 /* 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. */
@@ -658,7 +659,7 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
 }
 
 void
-server_loop2(void)
+server_loop2(Authctxt *authctxt)
 {
        fd_set *readset = NULL, *writeset = NULL;
        int rekeying = 0, max_fd, status;
@@ -672,6 +673,7 @@ server_loop2(void)
        connection_out = packet_get_connection_out();
 
        max_fd = MAX(connection_in, connection_out);
+       xxx_authctxt = authctxt;
 
        server_init_dispatch();
 
@@ -818,7 +820,7 @@ server_request_session(char *ctype)
                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;
index 9ea2b38d4a7e95dc33838557ca8897ac3becee22..f419198d1ce7a58d26256186f66211a8639b0c07 100644 (file)
@@ -1,4 +1,4 @@
-/*     $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>
@@ -22,6 +22,6 @@
 #define SERVERLOOP_H
 
 void    server_loop(pid_t, int, int, int);
-void    server_loop2(void);
+void    server_loop2(Authctxt *);
 
 #endif
index 5a6afa7ecaac4637d86a655ccb2f26c08cde5b4b..818f3211bc4d193e1b5462984002802984e6ebe5 100644 (file)
--- a/session.c
+++ b/session.c
@@ -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"
@@ -547,9 +547,9 @@ do_exec_pty(Session *s, const char *command)
 
        /* 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);
 
@@ -1562,7 +1562,7 @@ session_dump(void)
 }
 
 int
-session_open(int chanid)
+session_open(Authctxt *authctxt, int chanid)
 {
        Session *s = session_new();
        debug("session_open: channel %d", chanid);
@@ -1570,7 +1570,8 @@ session_open(int 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);
@@ -2052,5 +2053,5 @@ session_setup_x11fwd(Session *s)
 static void
 do_authenticated2(Authctxt *authctxt)
 {
-       server_loop2();
+       server_loop2(authctxt);
 }
index 39ab7d0e67aa25a15b87ea492483dbbb9531bb99..fd91ac17cc9fd08fcbba736509929df6b8eef940 100644 (file)
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
-/*     $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.
@@ -28,7 +28,7 @@
 
 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 *);
This page took 0.099822 seconds and 5 git commands to generate.