diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index b0b7cf6cc0..ed0db4a2ff 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2207,10 +2207,10 @@ static int verify_shutdown_creds( &m->polkit_registry, error); if (r < 0) { - /* If we get -EALREADY, it means a polkit decision was made, but not for + /* If we get -EBUSY, it means a polkit decision was made, but not for * this action in particular. Assuming we are blocked on inhibitors, * ignore that error and allow the decision to be revealed below. */ - if (blocked && r == -EALREADY) + if (blocked && r == -EBUSY) error_or_denial = true; else return r; @@ -3817,10 +3817,10 @@ static int method_inhibit(sd_bus_message *message, void *userdata, sd_bus_error &m->polkit_registry, error); if (r < 0) { - /* If we get -EALREADY, it means a polkit decision was made, but not for + /* If we get -EBUSY, it means a polkit decision was made, but not for * this action in particular. Assuming there are more actions requested, * ignore that error and allow the decision to be revealed later. */ - if ((~v & w) && r == -EALREADY) + if ((~v & w) && r == -EBUSY) error_or_denial = true; else return r; diff --git a/src/shared/bus-polkit.c b/src/shared/bus-polkit.c index 2e275f9da2..9cd0d6c677 100644 --- a/src/shared/bus-polkit.c +++ b/src/shared/bus-polkit.c @@ -440,7 +440,7 @@ static int async_polkit_query_check_action( /* Also deny if we've got an auth. failure for a previous action */ if (q->denied_action || q->error_action) - return -EALREADY; + return -EBUSY; return 0; /* no reply yet */ }