mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
pam_systemd: Properly check kdbus availability
This properly avoids setting DBUS_SESSION_BUS_ADDRESS if kdbus is loaded (or built into the kernel) but not wanted.
This commit is contained in:
parent
94c5528dc2
commit
c5d452bb22
@ -181,7 +181,7 @@ static int export_legacy_dbus_address(
|
||||
int r;
|
||||
|
||||
/* skip export if kdbus is not active */
|
||||
if (access("/sys/fs/kdbus", F_OK) < 0)
|
||||
if (!is_kdbus_available())
|
||||
return PAM_SUCCESS;
|
||||
|
||||
if (asprintf(&s, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, uid, runtime) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user