Index: monitor.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/monitor.c,v
retrieving revision 1.56
diff -u -p -r1.56 monitor.c
--- monitor.c	2 Sep 2003 21:32:46 -0000	1.56
+++ monitor.c	9 Feb 2004 09:52:10 -0000
@@ -1708,6 +1708,7 @@ monitor_init(void)
 
 	mon = xmalloc(sizeof(*mon));
 
+	mon->m_pid = 0;
 	monitor_socketpair(pair);
 
 	mon->m_recvfd = pair[0];
Index: sshd.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/sshd.c,v
retrieving revision 1.260
diff -u -p -r1.260 sshd.c
--- sshd.c	2 Sep 2003 12:51:17 -0000	1.260
+++ sshd.c	9 Feb 2004 09:53:06 -0000
@@ -199,7 +199,7 @@ int startup_pipe;		/* in child */
 
 /* variables used for privilege separation */
 int use_privsep;
-struct monitor *pmonitor;
+struct monitor *pmonitor = NULL;
 
 /* message to be displayed after login */
 Buffer loginmsg;
@@ -302,6 +302,9 @@ grace_alarm_handler(int sig)
 {
 	/* XXX no idea how fix this signal handler */
 
+	if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0)
+		kill(pmonitor->m_pid, SIGALRM);
+
 	/* Log error and exit. */
 	fatal("Timeout before authentication for %s", get_remote_ipaddr());
 }
@@ -592,6 +595,7 @@ privsep_preauth(void)
 		debug2("Network child is on pid %ld", (long)pid);
 
 		close(pmonitor->m_recvfd);
+		pmonitor->m_pid = pid;
 		authctxt = monitor_child_preauth(pmonitor);
 		close(pmonitor->m_sendfd);
 
