Index: monitor.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/monitor.c,v
retrieving revision 1.54
diff -u -p -r1.54 monitor.c
--- monitor.c	21 Nov 2003 11:57:03 -0000	1.54
+++ monitor.c	28 Jan 2004 11:52:20 -0000
@@ -1525,6 +1525,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: /cvs/src/usr.bin/ssh/sshd.c,v
retrieving revision 1.284
diff -u -p -r1.284 sshd.c
--- sshd.c	9 Dec 2003 21:53:37 -0000	1.284
+++ sshd.c	28 Jan 2004 11:52:21 -0000
@@ -190,7 +190,7 @@ int startup_pipe;		/* in child */
 
 /* variables used for privilege separation */
 int use_privsep;
-struct monitor *pmonitor;
+struct monitor *pmonitor = NULL;
 
 /* global authentication context */
 Authctxt *the_authctxt = NULL;
@@ -292,6 +292,8 @@ static void
 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());
@@ -580,6 +582,7 @@ privsep_preauth(Authctxt *authctxt)
 		debug2("Network child is on pid %ld", (long)pid);
 
 		close(pmonitor->m_recvfd);
+		pmonitor->m_pid = pid;
 		monitor_child_preauth(authctxt, pmonitor);
 		close(pmonitor->m_sendfd);
 
