From 6d3977e11a19667eaa8cb2cdfc772166f9afa89e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 27 Jan 2016 22:13:14 +0100 Subject: Add chroot capability to systemd service file Needed for running openvpn. Patch cherry-picked from upstream Git. --- debian/changelog | 7 +++++++ debian/patches/series | 1 + debian/patches/systemd-add-chroot-capability.patch | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 debian/patches/systemd-add-chroot-capability.patch 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 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 +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 + -- cgit 1.3.0-6-gf8a5