]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2003/05/14 08:57:49
authordjm <djm>
Wed, 14 May 2003 09:31:12 +0000 (09:31 +0000)
committerdjm <djm>
Wed, 14 May 2003 09:31:12 +0000 (09:31 +0000)
     [monitor.c]
     http://bugzilla.mindrot.org/show_bug.cgi?id=560
     Privsep child continues to run after monitor killed.
     Pass monitor signals through to child; Darren Tucker

ChangeLog
monitor.c

index f731c07568160f994957ef55c615a3372a15023c..a54c97b46eb68552b01109d16523fbe33ac5db55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      - better formatting in SYNOPSIS
      - whitespace at EOL
      ok djm@
+   - markus@cvs.openbsd.org 2003/05/14 08:57:49
+     [monitor.c]
+     http://bugzilla.mindrot.org/show_bug.cgi?id=560
+     Privsep child continues to run after monitor killed.
+     Pass monitor signals through to child; Darren Tucker
  - (djm) Make portable build with MIT krb5 (some issues remain)
  - (djm) Add new UsePAM configuration directive to allow runtime control
    over usage of PAM. This allows non-root use of sshd when built with
index 36f9a6c2001792c72f697315353615a8ee28483d..700925c8c5eff5727adc682905969d6fec13befe 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: monitor.c,v 1.39 2003/05/14 02:15:47 markus Exp $");
+RCSID("$OpenBSD: monitor.c,v 1.40 2003/05/14 08:57:49 markus Exp $");
 
 #include <openssl/dh.h>
 
@@ -143,6 +143,7 @@ static char *hostbased_chost = NULL;
 static char *auth_method = "unknown";
 static int session_id2_len = 0;
 static u_char *session_id2 = NULL;
+static pid_t monitor_child_pid;
 
 struct mon_table {
        enum monitor_reqtype type;
@@ -321,9 +322,25 @@ monitor_child_preauth(struct monitor *pmonitor)
        return (authctxt);
 }
 
+static void
+monitor_set_child_handler(pid_t pid)
+{
+       monitor_child_pid = pid;
+}
+
+static void
+monitor_child_handler(int signal)
+{
+       kill(monitor_child_pid, signal);
+}
+
 void
 monitor_child_postauth(struct monitor *pmonitor)
 {
+       monitor_set_child_handler(pmonitor->m_pid);
+       signal(SIGHUP, &monitor_child_handler);
+       signal(SIGTERM, &monitor_child_handler);
+
        if (compat20) {
                mon_dispatch = mon_dispatch_postauth20;
 
This page took 0.080491 seconds and 5 git commands to generate.