sleep: connect to correct bus when locking homed-managed homes

Partially reverts 122f6f1eaa

Fixes https://github.com/systemd/systemd/issues/29938#issuecomment-1869508708
This commit is contained in:
Mike Yuan 2023-12-26 20:38:47 +08:00 committed by Luca Boccassi
parent 5a4631bd8f
commit e14348c616

View file

@ -176,7 +176,7 @@ static int lock_all_homes(void) {
/* Let's synchronously lock all home directories managed by homed that have been marked for it. This
* way the key material required to access these volumes is hopefully removed from memory. */
r = bus_connect_system_systemd(&bus);
r = sd_bus_open_system(&bus);
if (r < 0)
return log_error_errno(r, "Failed to connect to system bus: %m");