]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/systemd-networkd.service.in
resolve: enable DynamicUser= for systemd-resolved.service
[thirdparty/systemd.git] / units / systemd-networkd.service.in
CommitLineData
a7df2d1e
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
f579559b
TG
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]
11Description=Network Service
12Documentation=man:systemd-networkd.service(8)
689d781b 13ConditionCapability=CAP_NET_ADMIN
f579559b 14DefaultDependencies=no
5f004d1e
MP
15# systemd-udevd.service can be dropped once tuntap is moved to netlink
16After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
689d781b
LP
17Before=network.target multi-user.target shutdown.target
18Conflicts=shutdown.target
f579559b
TG
19Wants=network.target
20
21[Service]
4b6141c4 22Type=notify
a97dcc12 23Restart=on-failure
f579559b 24RestartSec=0
c61f302d 25ExecStart=!!@rootlibexecdir@/systemd-networkd
0c28d51a 26WatchdogSec=3min
c61f302d
YW
27User=systemd-network
28CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
29AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
c7fb922d 30ProtectSystem=strict
1b8689f9 31ProtectHome=yes
0c28d51a 32ProtectControlGroups=yes
b6c7278c 33ProtectKernelModules=yes
40652ca4 34MemoryDenyWriteExecute=yes
0c28d51a 35RestrictRealtime=yes
46657f63 36RestrictNamespaces=yes
0c28d51a 37RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
6489ccfe 38SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
7f396e5f 39SystemCallArchitectures=native
bff8f254 40LockPersonality=yes
c61f302d
YW
41RuntimeDirectory=systemd/netif
42RuntimeDirectoryPreserve=yes
c4a0b20c
JD
43
44[Install]
45WantedBy=multi-user.target
5544ee85 46Also=systemd-networkd.socket
fb369a5b 47Alias=dbus-org.freedesktop.network1.service
9e496560
ZJS
48
49# We want to enable systemd-networkd-wait-online.service whenever this service
50# is enabled. systemd-networkd-wait-online.service has
51# WantedBy=network-online.target, so enabling it only has an effect if
52# network-online.target itself is enabled or pulled in by some other unit.
53Also=systemd-networkd-wait-online.service