mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
sleep: minor modernization for lock_all_homes
This commit is contained in:
parent
78c21009bf
commit
122f6f1eaa
|
@ -213,9 +213,9 @@ 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 = sd_bus_open_system(&bus);
|
||||
r = bus_connect_system_systemd(&bus);
|
||||
if (r < 0)
|
||||
return log_warning_errno(r, "Failed to connect to system bus, ignoring: %m");
|
||||
return log_error_errno(r, "Failed to connect to system bus: %m");
|
||||
|
||||
r = bus_message_new_method_call(bus, &m, bus_home_mgr, "LockAllHomes");
|
||||
if (r < 0)
|
||||
|
|
Loading…
Reference in a new issue