version 1.255, 2002/06/30 21:59:45 |
version 1.256, 2002/07/19 15:43:33 |
|
|
{ |
{ |
/* XXX no idea how fix this signal handler */ |
/* XXX no idea how fix this signal handler */ |
|
|
/* Close the connection. */ |
|
packet_close(); |
|
|
|
/* Log error and exit. */ |
/* Log error and exit. */ |
fatal("Timeout before authentication for %s.", get_remote_ipaddr()); |
fatal("Timeout before authentication for %s.", get_remote_ipaddr()); |
} |
} |
|
|
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); |
|
|
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 */ |
|
|
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); |