summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/session.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-11 08:11:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-11 08:11:35 +0000
commitb7ffabf30e9b71c0fc4730b1cfd1d304402cc63f (patch)
treee4d17e87a4e65e8c60c8df9825a1eedc0b26cf28 /usr.bin/ssh/session.c
parentb78f5c004b80070859ac7b5950f9c0da8b0b6333 (diff)
make MaxStartups code still work with -d; djm
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r--usr.bin/ssh/session.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index 95a0965aede..1c503b76a3d 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/session.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.22 2000/07/05 20:18:07 deraadt Exp $");
+RCSID("$OpenBSD: session.c,v 1.23 2000/07/11 08:11:33 deraadt Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -147,7 +147,10 @@ do_authenticated(struct passwd * pw)
* authentication.
*/
alarm(0);
- close(startup_pipe);
+ if (startup_pipe != -1) {
+ close(startup_pipe);
+ startup_pipe = -1;
+ }
/*
* Inform the channel mechanism that we are the server side and that
@@ -1563,7 +1566,10 @@ do_authenticated2(void)
* authentication.
*/
alarm(0);
- close(startup_pipe);
+ if (startup_pipe != -1) {
+ close(startup_pipe);
+ startup_pipe = -1;
+ }
server_loop2();
if (xauthfile)
xauthfile_cleanup_proc(NULL);