diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 19:20:55 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 19:20:55 +0000 |
commit | e086afa991390f2ca3373d39fc8ffafa0f031ffb (patch) | |
tree | 193cbfce20217c05c9275b0e1bdc9b08b9cd61b2 /monitor.c | |
parent | 80cd0658f4014053b9ea9a7ed4932a8284031f08 (diff) |
Debian release 3.6.1p2-4.
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -139,6 +139,7 @@ static char *hostbased_chost = NULL; | |||
139 | static char *auth_method = "unknown"; | 139 | static char *auth_method = "unknown"; |
140 | static int session_id2_len = 0; | 140 | static int session_id2_len = 0; |
141 | static u_char *session_id2 = NULL; | 141 | static u_char *session_id2 = NULL; |
142 | static pid_t monitor_child_pid; | ||
142 | 143 | ||
143 | struct mon_table { | 144 | struct mon_table { |
144 | enum monitor_reqtype type; | 145 | enum monitor_reqtype type; |
@@ -310,9 +311,25 @@ monitor_child_preauth(struct monitor *pmonitor) | |||
310 | return (authctxt); | 311 | return (authctxt); |
311 | } | 312 | } |
312 | 313 | ||
314 | static void | ||
315 | monitor_set_child_handler(pid_t pid) | ||
316 | { | ||
317 | monitor_child_pid = pid; | ||
318 | } | ||
319 | |||
320 | static void | ||
321 | monitor_child_handler(int signal) | ||
322 | { | ||
323 | kill(monitor_child_pid, signal); | ||
324 | } | ||
325 | |||
313 | void | 326 | void |
314 | monitor_child_postauth(struct monitor *pmonitor) | 327 | monitor_child_postauth(struct monitor *pmonitor) |
315 | { | 328 | { |
329 | monitor_set_child_handler(pmonitor->m_pid); | ||
330 | signal(SIGHUP, &monitor_child_handler); | ||
331 | signal(SIGTERM, &monitor_child_handler); | ||
332 | |||
316 | if (compat20) { | 333 | if (compat20) { |
317 | mon_dispatch = mon_dispatch_postauth20; | 334 | mon_dispatch = mon_dispatch_postauth20; |
318 | 335 | ||