summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index ebb44db75..42484c064 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.284 2003/12/09 21:53:37 markus Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.285 2004/02/05 05:37:17 dtucker Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -200,7 +200,7 @@ int startup_pipe; /* in child */
200 200
201/* variables used for privilege separation */ 201/* variables used for privilege separation */
202int use_privsep; 202int use_privsep;
203struct monitor *pmonitor; 203struct monitor *pmonitor = NULL;
204 204
205/* message to be displayed after login */ 205/* message to be displayed after login */
206Buffer loginmsg; 206Buffer loginmsg;
@@ -306,6 +306,9 @@ grace_alarm_handler(int sig)
306{ 306{
307 /* XXX no idea how fix this signal handler */ 307 /* XXX no idea how fix this signal handler */
308 308
309 if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0)
310 kill(pmonitor->m_pid, SIGALRM);
311
309 /* Log error and exit. */ 312 /* Log error and exit. */
310 fatal("Timeout before authentication for %s", get_remote_ipaddr()); 313 fatal("Timeout before authentication for %s", get_remote_ipaddr());
311} 314}
@@ -593,6 +596,7 @@ privsep_preauth(Authctxt *authctxt)
593 debug2("Network child is on pid %ld", (long)pid); 596 debug2("Network child is on pid %ld", (long)pid);
594 597
595 close(pmonitor->m_recvfd); 598 close(pmonitor->m_recvfd);
599 pmonitor->m_pid = pid;
596 monitor_child_preauth(authctxt, pmonitor); 600 monitor_child_preauth(authctxt, pmonitor);
597 close(pmonitor->m_sendfd); 601 close(pmonitor->m_sendfd);
598 602