diff options
author | Hyotaek Shim <hyotaek.shim@samsung.com> | 2022-06-02 16:53:13 +0900 |
---|---|---|
committer | Hyotaek Shim <hyotaek.shim@samsung.com> | 2022-06-02 17:08:26 +0900 |
commit | 7da044b9e8024918780db81dc68c1e981bac732c (patch) | |
tree | 3e7e1648451c8ed5c18322b5f57388b51c8c3a64 | |
parent | 06b72268302a349aafc4072410b6efb7b72eb510 (diff) | |
download | systemd-7da044b9e8024918780db81dc68c1e981bac732c.tar.gz systemd-7da044b9e8024918780db81dc68c1e981bac732c.tar.bz2 systemd-7da044b9e8024918780db81dc68c1e981bac732c.zip |
Refuse daemon-reload request during boot time
daemon-reload operations can empty the cgroup procs of transient unit,
resulting in user@5001.service stop.
org.freedesktop.systemd1.Manager.Reload
V
unit_free()
V
unit_unwatch_pid() Unit=user-5001.slice <-- tlm-sessiond
V
/sys/fs/cgroup/systemd/user.slice/user-5001.slice/session-c1.scope becomes empty
V
systemd-logind removes session-c1.scope by garbage collection
V
user@5001.service stops
Change-Id: I6195ed25a99c8506534b3bc8d72fbf83906b107c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
-rw-r--r-- | src/core/dbus-manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 127fe02f2e..d59f98b808 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1271,6 +1271,11 @@ static int method_reload(sd_bus_message *message, void *userdata, sd_bus_error * if (r < 0) return r; + if (!MANAGER_IS_FINISHED(m)) { + log_warning("Daemon-reload request is refused during boot time"); + return -1; + } + r = bus_verify_reload_daemon_async(m, message, error); if (r < 0) return r; |