From: Mike Yuan Date: Thu, 26 Oct 2023 15:50:50 +0000 (+0800) Subject: sleep: minor modernization for lock_all_homes X-Git-Tag: v255-rc1~108^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=122f6f1eaa4447449c7054793f6497eb9e4d03c6;p=thirdparty%2Fsystemd.git sleep: minor modernization for lock_all_homes --- diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 79d7a49b990..8dd14e55468 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -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)