mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
logind-dbus: refuse multiple jobs in method_do_shutdown_or_sleep too
Fixes #30917
This commit is contained in:
@@ -2128,6 +2128,12 @@ static int method_do_shutdown_or_sleep(
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
if (m->delayed_action)
|
||||
return sd_bus_error_setf(error, BUS_ERROR_OPERATION_IN_PROGRESS,
|
||||
"Action %s already in progress, refusing requested %s operation.",
|
||||
handle_action_to_string(m->delayed_action->handle),
|
||||
handle_action_to_string(a->handle));
|
||||
|
||||
/* reset case we're shorting a scheduled shutdown */
|
||||
m->unlink_nologin = false;
|
||||
reset_scheduled_shutdown(m);
|
||||
|
||||
Reference in New Issue
Block a user