diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-09-19 11:33:10 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-09-19 11:33:10 +0000 |
commit | 46027757abcc1fac8980efe314938adb337c15b6 (patch) | |
tree | 4b8255d4e9d6f9ed1e03cc0192e0c57e76348464 /usr.bin/ssh | |
parent | fa3bef7839bc3953dd269eaed97c60ddd3537067 (diff) |
do not call packet_close on fatal; ok deraadt
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/packet.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 10 |
2 files changed, 2 insertions, 13 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 91f3ab7a3f1..7635ac2d138 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -37,7 +37,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: packet.c,v 1.110 2003/09/19 09:02:02 markus Exp $"); +RCSID("$OpenBSD: packet.c,v 1.111 2003/09/19 11:33:09 markus Exp $"); #include <sys/queue.h> @@ -165,8 +165,6 @@ packet_set_connection(int fd_in, int fd_out) buffer_init(&incoming_packet); TAILQ_INIT(&outgoing); } - /* Kludge: arrange the close function to be called from fatal(). */ - fatal_add_cleanup((void (*) (void *)) packet_close, NULL); } /* Returns 1 if remote host is connected via socket, 0 if not. */ @@ -1333,7 +1331,6 @@ packet_disconnect(const char *fmt,...) /* Close the connection. */ packet_close(); - fatal_cleanup(); } diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 7bdfba462e7..311b3c0184b 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.276 2003/08/28 12:54:34 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.277 2003/09/19 11:33:09 markus Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -575,8 +575,6 @@ privsep_preauth(void) if (pid == -1) { fatal("fork of unprivileged child failed"); } else if (pid != 0) { - fatal_remove_cleanup((void (*) (void *)) packet_close, NULL); - debug2("Network child is on pid %ld", (long)pid); close(pmonitor->m_recvfd); @@ -590,10 +588,6 @@ privsep_preauth(void) while (waitpid(pid, &status, 0) < 0) if (errno != EINTR) break; - - /* Reinstall, since the child has finished */ - fatal_add_cleanup((void (*) (void *)) packet_close, NULL); - return (authctxt); } else { /* child */ @@ -637,8 +631,6 @@ privsep_postauth(Authctxt *authctxt) if (pmonitor->m_pid == -1) fatal("fork of unprivileged child failed"); else if (pmonitor->m_pid != 0) { - fatal_remove_cleanup((void (*) (void *)) packet_close, NULL); - debug2("User child is on pid %ld", (long)pmonitor->m_pid); close(pmonitor->m_recvfd); monitor_child_postauth(pmonitor); |