2020-11-09 05:23:58 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 17:35:03 +01:00
|
|
|
#
|
2013-10-17 03:18:36 +02:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Network Service
|
|
|
|
Documentation=man:systemd-networkd.service(8)
|
2014-06-17 02:18:33 +02:00
|
|
|
ConditionCapability=CAP_NET_ADMIN
|
2013-10-17 03:18:36 +02:00
|
|
|
DefaultDependencies=no
|
2016-11-22 08:41:51 +01:00
|
|
|
# systemd-udevd.service can be dropped once tuntap is moved to netlink
|
2020-08-26 16:54:45 +02:00
|
|
|
After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
|
2014-06-17 02:18:33 +02:00
|
|
|
Before=network.target multi-user.target shutdown.target
|
|
|
|
Conflicts=shutdown.target
|
2020-08-26 16:54:45 +02:00
|
|
|
Wants=systemd-networkd.socket network.target
|
2013-10-17 03:18:36 +02:00
|
|
|
|
|
|
|
[Service]
|
2017-08-26 18:40:47 +02:00
|
|
|
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
|
2020-09-11 10:56:06 +02:00
|
|
|
BusName=org.freedesktop.network1
|
2018-11-12 17:19:48 +01:00
|
|
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
|
2019-05-01 14:28:36 +02:00
|
|
|
DeviceAllow=char-* rw
|
2018-11-12 17:19:48 +01:00
|
|
|
ExecStart=!!@rootlibexecdir@/systemd-networkd
|
2020-12-08 16:21:58 +01:00
|
|
|
ExecReload=networkctl reload
|
2018-11-12 17:19:48 +01:00
|
|
|
LockPersonality=yes
|
|
|
|
MemoryDenyWriteExecute=yes
|
|
|
|
NoNewPrivileges=yes
|
2020-08-06 14:50:38 +02:00
|
|
|
ProtectProc=invisible
|
2020-04-02 20:18:11 +02:00
|
|
|
ProtectClock=yes
|
2016-08-26 13:23:27 +02:00
|
|
|
ProtectControlGroups=yes
|
2018-11-12 17:19:48 +01:00
|
|
|
ProtectHome=yes
|
2019-11-14 01:56:23 +01:00
|
|
|
ProtectKernelLogs=yes
|
2020-08-06 14:50:38 +02:00
|
|
|
ProtectKernelModules=yes
|
2018-11-12 17:19:48 +01:00
|
|
|
ProtectSystem=strict
|
|
|
|
Restart=on-failure
|
2020-08-06 14:50:38 +02:00
|
|
|
RestartKillSignal=SIGUSR2
|
2018-11-12 17:19:48 +01:00
|
|
|
RestartSec=0
|
2020-01-26 13:24:09 +01:00
|
|
|
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET AF_ALG
|
2018-11-12 17:19:48 +01:00
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictRealtime=yes
|
2019-03-20 19:52:20 +01:00
|
|
|
RestrictSUIDSGID=yes
|
2017-08-26 18:40:47 +02:00
|
|
|
RuntimeDirectory=systemd/netif
|
|
|
|
RuntimeDirectoryPreserve=yes
|
2018-11-12 17:19:48 +01:00
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallErrorNumber=EPERM
|
|
|
|
SystemCallFilter=@system-service
|
|
|
|
Type=notify
|
|
|
|
User=systemd-network
|
2019-10-25 12:17:24 +02:00
|
|
|
@SERVICE_WATCHDOG@
|
2014-02-21 04:38:17 +01:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2015-02-01 22:13:26 +01:00
|
|
|
Also=systemd-networkd.socket
|
2017-04-10 17:59:58 +02:00
|
|
|
Alias=dbus-org.freedesktop.network1.service
|
2017-03-27 12:55:55 +02:00
|
|
|
|
|
|
|
# We want to enable systemd-networkd-wait-online.service whenever this service
|
|
|
|
# is enabled. systemd-networkd-wait-online.service has
|
|
|
|
# WantedBy=network-online.target, so enabling it only has an effect if
|
|
|
|
# network-online.target itself is enabled or pulled in by some other unit.
|
|
|
|
Also=systemd-networkd-wait-online.service
|