Skip to content

Commit

Permalink
network: set DynamicUser= to systemd-networkd.service
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwata committed May 22, 2018
1 parent 0187368 commit d4e9e57
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/network/networkd-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int manager_connect_bus(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to add network enumerator: %m");

r = sd_bus_request_name_async(m->bus, NULL, "org.freedesktop.network1", 0, NULL, NULL);
r = bus_request_name_async_may_reload_dbus(m->bus, NULL, "org.freedesktop.network1", 0, NULL);
if (r < 0)
return log_error_errno(r, "Failed to request name: %m");

Expand Down
3 changes: 0 additions & 3 deletions sysusers.d/systemd.conf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
# (at your option) any later version.

g systemd-journal - -
m4_ifdef(`ENABLE_NETWORKD',
u systemd-network - "systemd Network Management"
)m4_dnl
m4_ifdef(`ENABLE_COREDUMP',
u systemd-coredump - "systemd Core Dumper"
)m4_dnl
6 changes: 3 additions & 3 deletions tmpfiles.d/systemd.conf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
m4_ifdef(`ENABLE_NETWORKD',
d /run/systemd/netif 0755 systemd-network systemd-network -
d /run/systemd/netif/links 0755 systemd-network systemd-network -
d /run/systemd/netif/leases 0755 systemd-network systemd-network -
d /run/systemd/netif 0755 root root -
d /run/systemd/netif/links 0755 root root -
d /run/systemd/netif/leases 0755 root root -
)m4_dnl

d /run/log 0755 root root -
Expand Down
4 changes: 2 additions & 2 deletions units/systemd-networkd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Documentation=man:systemd-networkd.service(8)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
# systemd-udevd.service can be dropped once tuntap is moved to netlink
After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
After=systemd-udevd.service network-pre.target systemd-sysctl.service
Before=network.target multi-user.target shutdown.target
Conflicts=shutdown.target
Wants=network.target
Expand All @@ -25,9 +25,9 @@ RestartSec=0
ExecStart=!!@rootlibexecdir@/systemd-networkd
WatchdogSec=3min
User=systemd-network
DynamicUser=yes
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
ProtectSystem=strict
ProtectHome=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
Expand Down

0 comments on commit d4e9e57

Please sign in to comment.