version 1.1, 2012/02/21 22:39:10
|
version 1.1.1.2, 2014/06/15 16:37:12
|
Line 1
|
Line 1
|
/* $NetBSD: privsep.c,v 1.21 2011/03/06 08:28:10 tteras Exp $ */ | /* $NetBSD: privsep.c,v 1.21.2.1 2011/08/12 05:46:06 tteras Exp $ */ |
|
|
/* Id: privsep.c,v 1.15 2005/08/08 11:23:44 vanhu Exp */ |
/* Id: privsep.c,v 1.15 2005/08/08 11:23:44 vanhu Exp */ |
|
|
Line 67
|
Line 67
|
#include "admin.h" |
#include "admin.h" |
#include "sockmisc.h" |
#include "sockmisc.h" |
#include "privsep.h" |
#include "privsep.h" |
|
#include "session.h" |
|
|
static int privsep_sock[2] = { -1, -1 }; |
static int privsep_sock[2] = { -1, -1 }; |
|
|
Line 193 privsep_recv(sock, bufp, lenp)
|
Line 194 privsep_recv(sock, bufp, lenp)
|
return 0; |
return 0; |
} |
} |
|
|
|
static int |
|
privsep_do_exit(void *ctx, int fd) |
|
{ |
|
kill(getpid(), SIGTERM); |
|
return 0; |
|
} |
|
|
int |
int |
privsep_init(void) |
privsep_init(void) |
{ |
{ |
Line 273 privsep_init(void)
|
Line 281 privsep_init(void)
|
strerror(errno)); |
strerror(errno)); |
return -1; |
return -1; |
} |
} |
|
monitor_fd(privsep_sock[1], privsep_do_exit, NULL, 0); |
|
|
return 0; |
return 0; |
break; |
break; |