summaryrefslogtreecommitdiffhomepage
path: root/svr-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-08-03 21:59:40 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-08-03 21:59:40 +0800
commitce59260ee9701d975baa4833534f1aedea6ba228 (patch)
treeac69e7fcd1e19abed7a4287599dc121e3c600670 /svr-session.c
parent387ebccf369be1d5bcc4ed810ada8f7e0c62aba3 (diff)
Fix problem where auth timeout wasn't checked when waiting for ident
Diffstat (limited to 'svr-session.c')
-rw-r--r--svr-session.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/svr-session.c b/svr-session.c
index d638d59..ea9ca7e 100644
--- a/svr-session.c
+++ b/svr-session.c
@@ -88,22 +88,12 @@ svr_session_cleanup(void) {
svr_ses.childpidsize = 0;
}
-static void
-svr_sessionloop() {
- if (svr_ses.connect_time != 0
- && monotonic_now() - svr_ses.connect_time >= AUTH_TIMEOUT) {
- dropbear_close("Timeout before auth");
- }
-}
-
void svr_session(int sock, int childpipe) {
char *host, *port;
size_t len;
common_session_init(sock, sock);
- svr_ses.connect_time = monotonic_now();;
-
/* Initialise server specific parts of the session */
svr_ses.childpipe = childpipe;
#ifdef USE_VFORK
@@ -146,7 +136,7 @@ void svr_session(int sock, int childpipe) {
/* Run the main for loop. NULL is for the dispatcher - only the client
* code makes use of it */
- session_loop(svr_sessionloop);
+ session_loop(NULL);
/* Not reached */