aboutsummaryrefslogtreecommitdiffstats
path: root/main/ipsec-tools/01-privsep-fix.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-08-23 14:58:18 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-08-23 14:59:26 +0300
commit75708decfc9606471b2f84956c5aedbdc587b5c1 (patch)
tree5758bae5c4e480bbec562b856d5c11ae1e51e7cb /main/ipsec-tools/01-privsep-fix.patch
parentc2a9ab90408365e4d68c3bfe3350a09fd908881a (diff)
downloadaports-75708decfc9606471b2f84956c5aedbdc587b5c1.tar.bz2
aports-75708decfc9606471b2f84956c5aedbdc587b5c1.tar.xz
main/ipsec-tools: cherry-pick fixes from upstream CVS
Diffstat (limited to 'main/ipsec-tools/01-privsep-fix.patch')
-rw-r--r--main/ipsec-tools/01-privsep-fix.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/main/ipsec-tools/01-privsep-fix.patch b/main/ipsec-tools/01-privsep-fix.patch
new file mode 100644
index 0000000000..a4842a8ac9
--- /dev/null
+++ b/main/ipsec-tools/01-privsep-fix.patch
@@ -0,0 +1,46 @@
+Please note that diffs are not public domain; they are subject to the
+copyright notices on the relevant files.
+
+===================================================================
+RCS file: /ftp/cvs/cvsroot/src/crypto/dist/ipsec-tools/src/racoon/privsep.c,v
+retrieving revision 1.21
+retrieving revision 1.21.2.1
+diff -u -p -r1.21 -r1.21.2.1
+--- ipsec-tools/src/racoon/privsep.c 2011/03/06 08:28:10 1.21
++++ ipsec-tools/src/racoon/privsep.c 2011/08/12 05:46:06 1.21.2.1
+@@ -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 @@ privsep_recv(sock, bufp, lenp)
+ return 0;
+ }
+
++static int
++privsep_do_exit(void *ctx, int fd)
++{
++ kill(getpid(), SIGTERM);
++ return 0;
++}
++
+ int
+ privsep_init(void)
+ {
+@@ -273,6 +281,7 @@ privsep_init(void)
+ strerror(errno));
+ return -1;
+ }
++ monitor_fd(privsep_sock[1], privsep_do_exit, NULL, 0);
+
+ return 0;
+ break;