diff --git a/ChangeLog b/ChangeLog index ea27f1747..340be6e2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,9 @@ - markus@cvs.openbsd.org 2003/09/19 11:31:33 [channels.c] do not call channel_free_all on fatal; ok deraadt + - markus@cvs.openbsd.org 2003/09/19 11:33:09 + [packet.c sshd.c] + do not call packet_close on fatal; ok deraadt 20030919 - (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL; @@ -1197,4 +1200,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.3033 2003/09/22 11:12:56 dtucker Exp $ +$Id: ChangeLog,v 1.3034 2003/09/22 11:13:59 dtucker Exp $ diff --git a/packet.c b/packet.c index 02b629f30..6e7e574ab 100644 --- a/packet.c +++ b/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 "openbsd-compat/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. */ @@ -1338,7 +1336,6 @@ packet_disconnect(const char *fmt,...) /* Close the connection. */ packet_close(); - fatal_cleanup(); } diff --git a/sshd.c b/sshd.c index 47df9caf1..4b3ff0da3 100644 --- a/sshd.c +++ b/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 #include @@ -587,8 +587,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); @@ -602,10 +600,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 */ @@ -653,8 +647,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);