mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
resolve: enable DynamicUser= for systemd-resolved.service
This commit is contained in:
parent
fdff1da299
commit
0187368cad
@ -1918,7 +1918,7 @@ int manager_connect_bus(Manager *m) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to register dnssd enumerator: %m");
|
||||
|
||||
r = sd_bus_request_name_async(m->bus, NULL, "org.freedesktop.resolve1", 0, NULL, NULL);
|
||||
r = bus_request_name_async_may_reload_dbus(m->bus, NULL, "org.freedesktop.resolve1", 0, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to request name: %m");
|
||||
|
||||
|
@ -9,9 +9,6 @@ g systemd-journal - -
|
||||
m4_ifdef(`ENABLE_NETWORKD',
|
||||
u systemd-network - "systemd Network Management"
|
||||
)m4_dnl
|
||||
m4_ifdef(`ENABLE_RESOLVE',
|
||||
u systemd-resolve - "systemd Resolver"
|
||||
)m4_dnl
|
||||
m4_ifdef(`ENABLE_COREDUMP',
|
||||
u systemd-coredump - "systemd Core Dumper"
|
||||
)m4_dnl
|
||||
|
@ -14,7 +14,7 @@ Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
|
||||
Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
|
||||
Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
|
||||
DefaultDependencies=no
|
||||
After=systemd-sysusers.service systemd-networkd.service
|
||||
After=systemd-networkd.service
|
||||
Before=network.target nss-lookup.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
Wants=nss-lookup.target
|
||||
@ -26,11 +26,10 @@ RestartSec=0
|
||||
ExecStart=!!@rootlibexecdir@/systemd-resolved
|
||||
WatchdogSec=3min
|
||||
User=systemd-resolve
|
||||
DynamicUser=yes
|
||||
CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectKernelTunables=yes
|
||||
|
Loading…
Reference in New Issue
Block a user