- 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
This commit is contained in:
parent
d6ead282db
commit
be64d43d01
|
@ -72,6 +72,11 @@
|
||||||
- better formatting in SYNOPSIS
|
- better formatting in SYNOPSIS
|
||||||
- whitespace at EOL
|
- whitespace at EOL
|
||||||
ok djm@
|
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) Make portable build with MIT krb5 (some issues remain)
|
||||||
- (djm) Add new UsePAM configuration directive to allow runtime control
|
- (djm) Add new UsePAM configuration directive to allow runtime control
|
||||||
over usage of PAM. This allows non-root use of sshd when built with
|
over usage of PAM. This allows non-root use of sshd when built with
|
||||||
|
@ -1465,4 +1470,4 @@
|
||||||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||||
ok provos@
|
ok provos@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2697 2003/05/14 09:30:38 djm Exp $
|
$Id: ChangeLog,v 1.2698 2003/05/14 09:31:12 djm Exp $
|
||||||
|
|
19
monitor.c
19
monitor.c
|
@ -25,7 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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>
|
#include <openssl/dh.h>
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ static char *hostbased_chost = NULL;
|
||||||
static char *auth_method = "unknown";
|
static char *auth_method = "unknown";
|
||||||
static int session_id2_len = 0;
|
static int session_id2_len = 0;
|
||||||
static u_char *session_id2 = NULL;
|
static u_char *session_id2 = NULL;
|
||||||
|
static pid_t monitor_child_pid;
|
||||||
|
|
||||||
struct mon_table {
|
struct mon_table {
|
||||||
enum monitor_reqtype type;
|
enum monitor_reqtype type;
|
||||||
|
@ -321,9 +322,25 @@ monitor_child_preauth(struct monitor *pmonitor)
|
||||||
return (authctxt);
|
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
|
void
|
||||||
monitor_child_postauth(struct monitor *pmonitor)
|
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) {
|
if (compat20) {
|
||||||
mon_dispatch = mon_dispatch_postauth20;
|
mon_dispatch = mon_dispatch_postauth20;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue