SHA256
1
0
forked from jengelh/strongswan
strongswan/strongswan_old-caps-version.diff

31 lines
1.1 KiB
Diff
Raw Normal View History

Index: /trunk/src/charon/daemon.c
===================================================================
--- /trunk/src/charon/daemon.c (revision 3825)
+++ /trunk/src/charon/daemon.c (revision 3908)
@@ -267,5 +267,11 @@
}
+ /* we use the old capset version for now. For systems with version 2
+ * available, we specifiy version 1 excplicitly. */
+#ifdef _LINUX_CAPABILITY_VERSION_1
+ hdr.version = _LINUX_CAPABILITY_VERSION_1;
+#else
hdr.version = _LINUX_CAPABILITY_VERSION;
+#endif
hdr.pid = 0;
data.inheritable = data.effective = data.permitted = keep;
Index: /trunk/src/pluto/plutomain.c
===================================================================
--- /trunk/src/pluto/plutomain.c (revision 3253)
+++ /trunk/src/pluto/plutomain.c (revision 3914)
@@ -618,5 +620,9 @@
/* drop unneeded capabilities and change UID/GID */
+#ifdef _LINUX_CAPABILITY_VERSION_1
+ hdr.version = _LINUX_CAPABILITY_VERSION_1;
+#else
hdr.version = _LINUX_CAPABILITY_VERSION;
+#endif
hdr.pid = 0;
data.inheritable = data.effective = data.permitted =