mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
sd-bus: fix response for GetAll on non-existent objects
Before this commit, if you run `loginctl user-status` from debug-shell.service (and you have no login sessions for root), you always see this output: 0 Linger: no because Properties.GetAll is returning success but without any properties, when the only find() callback had returned 0 to mean "no object found". After: Could not get properties: Unknown object: '/org/freedesktop/login1/user/self' BTW I have a fix for more user-friendly messages from logind in this case. It is pending in my local branch for #6829 "fix `loginctl enable-linger`".
This commit is contained in:
parent
c13ee7cc8b
commit
733e792bc6
@ -829,6 +829,9 @@ static int property_get_all_callbacks_run(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!*found_object)
|
||||
return 0;
|
||||
|
||||
if (!found_interface) {
|
||||
r = sd_bus_reply_method_errorf(
|
||||
m,
|
||||
|
Loading…
x
Reference in New Issue
Block a user