diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 2515f54adac..7da35a803c6 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1708,6 +1708,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;