Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/ipsec-tools-0_8-branch]: src/crypto/dist/ipsec-tools/src/racoon Have pri...
details: https://anonhg.NetBSD.org/src/rev/4c683148f471
branches: ipsec-tools-0_8-branch
changeset: 763322:4c683148f471
user: tteras <tteras%NetBSD.org@localhost>
date: Fri Aug 12 05:46:06 2011 +0000
description:
Have privilege separation child process exit if the parent exits.
diffstat:
crypto/dist/ipsec-tools/src/racoon/privsep.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r a230340ba121 -r 4c683148f471 crypto/dist/ipsec-tools/src/racoon/privsep.c
--- a/crypto/dist/ipsec-tools/src/racoon/privsep.c Fri Aug 12 05:42:16 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/privsep.c Fri Aug 12 05:46:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $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 */
@@ -67,6 +67,7 @@
#include "admin.h"
#include "sockmisc.h"
#include "privsep.h"
+#include "session.h"
static int privsep_sock[2] = { -1, -1 };
@@ -193,6 +194,13 @@
return 0;
}
+static int
+privsep_do_exit(void *ctx, int fd)
+{
+ kill(getpid(), SIGTERM);
+ return 0;
+}
+
int
privsep_init(void)
{
@@ -273,6 +281,7 @@
strerror(errno));
return -1;
}
+ monitor_fd(privsep_sock[1], privsep_do_exit, NULL, 0);
return 0;
break;
Home |
Main Index |
Thread Index |
Old Index