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 0fd902f9..0764588f 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.229 2002/03/14 16:38:26 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.230 2002/03/18 01:12:14 provos Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -72,6 +72,7 @@ RCSID("$OpenBSD: sshd.c,v 1.229 2002/03/14 16:38:26 markus Exp $");
#include "misc.h"
#include "dispatch.h"
#include "channels.h"
+#include "session.h"
#ifdef LIBWRAP
#include <tcpd.h>
@@ -594,6 +595,7 @@ main(int ac, char **av)
int listen_sock, maxfd;
int startup_p[2];
int startups = 0;
+ Authctxt *authctxt;
Key *key;
int ret, key_used = 0;
@@ -1235,11 +1237,15 @@ main(int ac, char **av)
/* authenticate user and start session */
if (compat20) {
do_ssh2_kex();
- do_authentication2();
+ authctxt = do_authentication2();
} else {
do_ssh1_kex();
- do_authentication();
+ authctxt = do_authentication();
}
+
+ /* Perform session preparation. */
+ do_authenticated(authctxt);
+
/* The connection has been terminated. */
verbose("Closing connection to %.100s", remote_ip);