chiark / gitweb /
udev: do NOT re-label smack
[elogind.git] / units / systemd-networkd.service.in
index 835c07ddcd5aeb838f672e69db81709248b8f6ab..fe92da21235f14aff3f73a4b888c031d2e79eb9e 100644 (file)
@@ -8,15 +8,24 @@
 [Unit]
 Description=Network Service
 Documentation=man:systemd-networkd.service(8)
+ConditionCapability=CAP_NET_ADMIN
 DefaultDependencies=no
-After=dbus.service
-Before=network.target
+# dbus.service can be dropped once on kdbus, and systemd-udevd.service can be
+# dropped once tuntap is moved to netlink
+After=systemd-udevd.service dbus.service network-pre.target systemd-sysusers.service
+Before=network.target multi-user.target shutdown.target
+Conflicts=shutdown.target
 Wants=network.target
-ConditionCapability=CAP_NET_ADMIN
 
 [Service]
 Type=notify
 Restart=always
 RestartSec=0
 ExecStart=@rootlibexecdir@/systemd-networkd
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER
+ProtectSystem=full
+ProtectHome=yes
 WatchdogSec=1min
+
+[Install]
+WantedBy=multi-user.target