]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - units/systemd-resolved.service.in
test-string-util: add another test for stripping slashes
[thirdparty/systemd.git] / units / systemd-resolved.service.in
index 00967e38603d7310474f832b4a24b5e98ed12fd8..8059aa7b626e792fae54bc25569731fde9cdaf26 100644 (file)
@@ -1,3 +1,5 @@
+#  SPDX-License-Identifier: LGPL-2.1+
+#
 #  This file is part of systemd.
 #
 #  systemd is free software; you can redistribute it and/or modify it
 [Unit]
 Description=Network Name Resolution
 Documentation=man:systemd-resolved.service(8)
-After=systemd-networkd.service network.service
-
-# On kdbus systems we pull in the busname explicitly, because it
-# carries policy that allows the daemon to acquire its name.
-Wants=org.freedesktop.resolve1.busname
-After=org.freedesktop.resolve1.busname
+Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
+Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
+Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
+After=systemd-networkd.service network.target
+Before=network-online.target nss-lookup.target
+Wants=nss-lookup.target
 
 [Service]
 Type=notify
 Restart=always
 RestartSec=0
-ExecStart=@rootlibexecdir@/systemd-resolved
-CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER
-SecureBits=noroot noroot-locked
-ProtectSystem=full
+ExecStart=!!@rootlibexecdir@/systemd-resolved
+WatchdogSec=3min
+User=systemd-resolve
+CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectSystem=strict
 ProtectHome=yes
-WatchdogSec=1min
+ProtectControlGroups=yes
+ProtectKernelTunables=yes
+ProtectKernelModules=yes
+MemoryDenyWriteExecute=yes
+RestrictRealtime=yes
+RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
+SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
+SystemCallArchitectures=native
+LockPersonality=yes
+RuntimeDirectory=systemd/resolve
+RuntimeDirectoryPreserve=yes
 
 [Install]
 WantedBy=multi-user.target
+Alias=dbus-org.freedesktop.resolve1.service