summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sshd.c b/sshd.c
index 47df9caf1..4b3ff0da3 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.276 2003/08/28 12:54:34 markus Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.277 2003/09/19 11:33:09 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -587,8 +587,6 @@ privsep_preauth(void)
587 if (pid == -1) { 587 if (pid == -1) {
588 fatal("fork of unprivileged child failed"); 588 fatal("fork of unprivileged child failed");
589 } else if (pid != 0) { 589 } else if (pid != 0) {
590 fatal_remove_cleanup((void (*) (void *)) packet_close, NULL);
591
592 debug2("Network child is on pid %ld", (long)pid); 590 debug2("Network child is on pid %ld", (long)pid);
593 591
594 close(pmonitor->m_recvfd); 592 close(pmonitor->m_recvfd);
@@ -602,10 +600,6 @@ privsep_preauth(void)
602 while (waitpid(pid, &status, 0) < 0) 600 while (waitpid(pid, &status, 0) < 0)
603 if (errno != EINTR) 601 if (errno != EINTR)
604 break; 602 break;
605
606 /* Reinstall, since the child has finished */
607 fatal_add_cleanup((void (*) (void *)) packet_close, NULL);
608
609 return (authctxt); 603 return (authctxt);
610 } else { 604 } else {
611 /* child */ 605 /* child */
@@ -653,8 +647,6 @@ privsep_postauth(Authctxt *authctxt)
653 if (pmonitor->m_pid == -1) 647 if (pmonitor->m_pid == -1)
654 fatal("fork of unprivileged child failed"); 648 fatal("fork of unprivileged child failed");
655 else if (pmonitor->m_pid != 0) { 649 else if (pmonitor->m_pid != 0) {
656 fatal_remove_cleanup((void (*) (void *)) packet_close, NULL);
657
658 debug2("User child is on pid %ld", (long)pmonitor->m_pid); 650 debug2("User child is on pid %ld", (long)pmonitor->m_pid);
659 close(pmonitor->m_recvfd); 651 close(pmonitor->m_recvfd);
660 monitor_child_postauth(pmonitor); 652 monitor_child_postauth(pmonitor);