]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-resolved.service.in
a078a9dd684bf08da87c89c068365f054a67c670
[thirdparty/systemd.git] / units / systemd-resolved.service.in
1 # SPDX-License-Identifier: LGPL-2.1-or-later
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=man:org.freedesktop.resolve1(5)
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
17 DefaultDependencies=no
18 After=systemd-sysusers.service
19 Before=sysinit.target network.target nss-lookup.target shutdown.target initrd-switch-root.target
20 Conflicts=shutdown.target initrd-switch-root.target
21 Wants=nss-lookup.target
22
23 [Service]
24 AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
25 BusName=org.freedesktop.resolve1
26 CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
27 ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-resolved
28 LockPersonality=yes
29 MemoryDenyWriteExecute=yes
30 NoNewPrivileges=yes
31 PrivateDevices=yes
32 PrivateTmp=yes
33 ProtectClock=yes
34 ProtectControlGroups=yes
35 ProtectHome=yes
36 ProtectKernelLogs=yes
37 ProtectKernelModules=yes
38 ProtectKernelTunables=yes
39 ProtectSystem=strict
40 Restart=always
41 RestartSec=0
42 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
43 RestrictNamespaces=yes
44 RestrictRealtime=yes
45 RestrictSUIDSGID=yes
46 RuntimeDirectory=systemd/resolve
47 RuntimeDirectoryPreserve=yes
48 SystemCallArchitectures=native
49 SystemCallErrorNumber=EPERM
50 SystemCallFilter=@system-service
51 Type=notify
52 User=systemd-resolve
53 ImportCredential=network.dns
54 ImportCredential=network.search_domains
55 {{SERVICE_WATCHDOG}}
56
57 [Install]
58 WantedBy=sysinit.target
59 Alias=dbus-org.freedesktop.resolve1.service