[packet.c sshd.c]
     do not call packet_close on fatal; ok deraadt
This commit is contained in:
Darren Tucker 2003-09-22 21:13:59 +10:00
Родитель 3dbff2a93b
Коммит aaa56cb804
3 изменённых файлов: 6 добавлений и 14 удалений

Просмотреть файл

@ -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 $

Просмотреть файл

@ -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();
}

10
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>
@ -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);