summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-22 01:27:35 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-22 01:27:35 +0000
commit73ab9ba45d369ef35b0e81590d5d46cc376466c9 (patch)
treed71733dedcdf95447dc81ffb62db5f2f56150dc6 /sshd.c
parent2ae18f40a70632eb87eca114980649dae8c476ff (diff)
- provos@cvs.openbsd.org 2002/03/18 01:12:14
[auth.h auth1.c auth2.c sshd.c] have the authentication functions return the authentication context and then do_authenticated; okay millert@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index 0fd902f90..0764588fc 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.229 2002/03/14 16:38:26 markus Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.230 2002/03/18 01:12:14 provos Exp $");
44 44
45#include <openssl/dh.h> 45#include <openssl/dh.h>
46#include <openssl/bn.h> 46#include <openssl/bn.h>
@@ -72,6 +72,7 @@ RCSID("$OpenBSD: sshd.c,v 1.229 2002/03/14 16:38:26 markus Exp $");
72#include "misc.h" 72#include "misc.h"
73#include "dispatch.h" 73#include "dispatch.h"
74#include "channels.h" 74#include "channels.h"
75#include "session.h"
75 76
76#ifdef LIBWRAP 77#ifdef LIBWRAP
77#include <tcpd.h> 78#include <tcpd.h>
@@ -594,6 +595,7 @@ main(int ac, char **av)
594 int listen_sock, maxfd; 595 int listen_sock, maxfd;
595 int startup_p[2]; 596 int startup_p[2];
596 int startups = 0; 597 int startups = 0;
598 Authctxt *authctxt;
597 Key *key; 599 Key *key;
598 int ret, key_used = 0; 600 int ret, key_used = 0;
599 601
@@ -1235,11 +1237,15 @@ main(int ac, char **av)
1235 /* authenticate user and start session */ 1237 /* authenticate user and start session */
1236 if (compat20) { 1238 if (compat20) {
1237 do_ssh2_kex(); 1239 do_ssh2_kex();
1238 do_authentication2(); 1240 authctxt = do_authentication2();
1239 } else { 1241 } else {
1240 do_ssh1_kex(); 1242 do_ssh1_kex();
1241 do_authentication(); 1243 authctxt = do_authentication();
1242 } 1244 }
1245
1246 /* Perform session preparation. */
1247 do_authenticated(authctxt);
1248
1243 /* The connection has been terminated. */ 1249 /* The connection has been terminated. */
1244 verbose("Closing connection to %.100s", remote_ip); 1250 verbose("Closing connection to %.100s", remote_ip);
1245 1251