]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-resolved.service.in
homed: explicitly deactivate all home directories on shutdown
[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=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 systemd-networkd.service
19 Before=network.target nss-lookup.target shutdown.target
20 Conflicts=shutdown.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 ProtectProc=invisible
34 ProtectClock=yes
35 ProtectControlGroups=yes
36 ProtectHome=yes
37 ProtectKernelLogs=yes
38 ProtectKernelModules=yes
39 ProtectKernelTunables=yes
40 ProtectSystem=strict
41 Restart=always
42 RestartSec=0
43 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
44 RestrictNamespaces=yes
45 RestrictRealtime=yes
46 RestrictSUIDSGID=yes
47 RuntimeDirectory=systemd/resolve
48 RuntimeDirectoryPreserve=yes
49 SystemCallArchitectures=native
50 SystemCallErrorNumber=EPERM
51 SystemCallFilter=@system-service
52 Type=notify
53 User=systemd-resolve
54 @SERVICE_WATCHDOG@
55
56 [Install]
57 WantedBy=multi-user.target
58 Alias=dbus-org.freedesktop.resolve1.service