mirror of
https://github.com/systemd/systemd.git
synced 2025-01-20 18:04:03 +03:00
core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in user manager broadcasting signal and initiating soft-reboot...
This commit is contained in:
parent
541aadff97
commit
236cd48546
@ -1709,6 +1709,10 @@ static int method_soft_reboot(sd_bus_message *message, void *userdata, sd_bus_er
|
||||
|
||||
assert(message);
|
||||
|
||||
if (!MANAGER_IS_SYSTEM(m))
|
||||
return sd_bus_error_set(error, SD_BUS_ERROR_NOT_SUPPORTED,
|
||||
"Soft reboot is only supported by system manager.");
|
||||
|
||||
r = verify_run_space_permissive("soft reboot may fail", error);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user