summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/session.c12
-rw-r--r--usr.bin/ssh/sshd.c3
2 files changed, 11 insertions, 4 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);
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 919ec274585..8db21977199 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.121 2000/07/05 21:35:56 provos Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.122 2000/07/11 08:11:34 deraadt Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -845,6 +845,7 @@ main(int ac, char **av)
close_listen_socks();
sock_in = newsock;
sock_out = newsock;
+ startup_pipe = -1;
pid = getpid();
break;
} else {