]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-resolved.service.in
Revert "units: set NoNewPrivileges= for all long-running services"
[thirdparty/systemd.git] / units / systemd-resolved.service.in
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # This file is part of systemd.
4 #
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
9
10 [Unit]
11 Description=Network Name Resolution
12 Documentation=man:systemd-resolved.service(8)
13 Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
14 Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
15 Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
16 DefaultDependencies=no
17 After=systemd-sysusers.service systemd-networkd.service
18 Before=network.target nss-lookup.target shutdown.target
19 Conflicts=shutdown.target
20 Wants=nss-lookup.target
21
22 [Service]
23 Type=notify
24 Restart=always
25 RestartSec=0
26 ExecStart=!!@rootlibexecdir@/systemd-resolved
27 WatchdogSec=3min
28 User=systemd-resolve
29 CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
30 AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
31 PrivateTmp=yes
32 PrivateDevices=yes
33 ProtectSystem=strict
34 ProtectHome=yes
35 ProtectControlGroups=yes
36 ProtectKernelTunables=yes
37 ProtectKernelModules=yes
38 MemoryDenyWriteExecute=yes
39 RestrictRealtime=yes
40 RestrictNamespaces=yes
41 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
42 SystemCallFilter=@system-service
43 SystemCallErrorNumber=EPERM
44 SystemCallArchitectures=native
45 LockPersonality=yes
46 RuntimeDirectory=systemd/resolve
47 RuntimeDirectoryPreserve=yes
48
49 [Install]
50 WantedBy=multi-user.target
51 Alias=dbus-org.freedesktop.resolve1.service