about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-01-27 22:13:14 +0100
committerMichael Biebl <biebl@debian.org>2016-01-27 22:13:17 +0100
commit6d3977e11a19667eaa8cb2cdfc772166f9afa89e (patch)
tree0291ffefe9add6d288e21a6a1e3bf147e8032102
parentb5a96979a49b1fa905a74b6587b0d2b78f9bf9ac (diff)
Add chroot capability to systemd service file
Needed for running openvpn. Patch cherry-picked from upstream Git.
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/systemd-add-chroot-capability.patch22
3 files changed, 30 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index e56f64e6..0493b2a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+network-manager (1.1.90-3) UNRELEASED; urgency=medium
+
+  * Add chroot capability to systemd service file. Needed for running openvpn.
+    Patch cherry-picked from upstream Git.
+
+ -- Michael Biebl <biebl@debian.org>  Wed, 27 Jan 2016 22:12:19 +0100
+
 network-manager (1.1.90-2) experimental; urgency=medium
 
   * Update debian/copyright.
diff --git a/debian/patches/series b/debian/patches/series
index 4cd21f84..41b67091 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ Don-t-block-network.target-on-NetworkManager-wait-on.patch
 Fix-iscsiadm-path.patch
 libnm-vpn-restore-export-of-deprecated-NMVpnPluginOld-sym.patch
 tests-use-dbus-run-session-instead-of-dbus-launch.patch
+systemd-add-chroot-capability.patch
diff --git a/debian/patches/systemd-add-chroot-capability.patch b/debian/patches/systemd-add-chroot-capability.patch
new file mode 100644
index 00000000..97ac3f2f
--- /dev/null
+++ b/debian/patches/systemd-add-chroot-capability.patch
@@ -0,0 +1,22 @@
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Fri, 22 Jan 2016 22:11:07 +0100
+Subject: systemd: add chroot capability
+
+CAP_SYS_CHROOT is needed for openvpn hardening.
+---
+ data/NetworkManager.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
+index 90c0664..ff0e301 100644
+--- a/data/NetworkManager.service.in
++++ b/data/NetworkManager.service.in
+@@ -9,7 +9,7 @@ ExecStart=@sbindir@/NetworkManager --no-daemon
+ Restart=on-failure
+ # NM doesn't want systemd to kill its children for it
+ KillMode=process
+-CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL
++CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT
+ ProtectSystem=true
+ ProtectHome=read-only
+