зеркало из https://github.com/Azure/sonic-openssh.git
- markus@cvs.openbsd.org 2003/09/19 11:33:09
[packet.c sshd.c] do not call packet_close on fatal; ok deraadt
This commit is contained in:
Родитель
3dbff2a93b
Коммит
aaa56cb804
|
@ -61,6 +61,9 @@
|
||||||
- markus@cvs.openbsd.org 2003/09/19 11:31:33
|
- markus@cvs.openbsd.org 2003/09/19 11:31:33
|
||||||
[channels.c]
|
[channels.c]
|
||||||
do not call channel_free_all on fatal; ok deraadt
|
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
|
20030919
|
||||||
- (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL;
|
- (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.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
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 $
|
||||||
|
|
5
packet.c
5
packet.c
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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"
|
#include "openbsd-compat/sys-queue.h"
|
||||||
|
|
||||||
|
@ -165,8 +165,6 @@ packet_set_connection(int fd_in, int fd_out)
|
||||||
buffer_init(&incoming_packet);
|
buffer_init(&incoming_packet);
|
||||||
TAILQ_INIT(&outgoing);
|
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. */
|
/* Returns 1 if remote host is connected via socket, 0 if not. */
|
||||||
|
@ -1338,7 +1336,6 @@ packet_disconnect(const char *fmt,...)
|
||||||
|
|
||||||
/* Close the connection. */
|
/* Close the connection. */
|
||||||
packet_close();
|
packet_close();
|
||||||
|
|
||||||
fatal_cleanup();
|
fatal_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
sshd.c
10
sshd.c
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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/dh.h>
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
@ -587,8 +587,6 @@ privsep_preauth(void)
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
fatal("fork of unprivileged child failed");
|
fatal("fork of unprivileged child failed");
|
||||||
} else if (pid != 0) {
|
} else if (pid != 0) {
|
||||||
fatal_remove_cleanup((void (*) (void *)) packet_close, NULL);
|
|
||||||
|
|
||||||
debug2("Network child is on pid %ld", (long)pid);
|
debug2("Network child is on pid %ld", (long)pid);
|
||||||
|
|
||||||
close(pmonitor->m_recvfd);
|
close(pmonitor->m_recvfd);
|
||||||
|
@ -602,10 +600,6 @@ privsep_preauth(void)
|
||||||
while (waitpid(pid, &status, 0) < 0)
|
while (waitpid(pid, &status, 0) < 0)
|
||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Reinstall, since the child has finished */
|
|
||||||
fatal_add_cleanup((void (*) (void *)) packet_close, NULL);
|
|
||||||
|
|
||||||
return (authctxt);
|
return (authctxt);
|
||||||
} else {
|
} else {
|
||||||
/* child */
|
/* child */
|
||||||
|
@ -653,8 +647,6 @@ privsep_postauth(Authctxt *authctxt)
|
||||||
if (pmonitor->m_pid == -1)
|
if (pmonitor->m_pid == -1)
|
||||||
fatal("fork of unprivileged child failed");
|
fatal("fork of unprivileged child failed");
|
||||||
else if (pmonitor->m_pid != 0) {
|
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);
|
debug2("User child is on pid %ld", (long)pmonitor->m_pid);
|
||||||
close(pmonitor->m_recvfd);
|
close(pmonitor->m_recvfd);
|
||||||
monitor_child_postauth(pmonitor);
|
monitor_child_postauth(pmonitor);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче