diff options
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2015-06-21 05:59:34 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:03:50 +0100 |
commit | c7f1a65b0b5f16d1e12ec42c5578fd9850611147 (patch) | |
tree | 3989ae8637c659a0c28cc8e605757b6356771ad1 /src/login | |
parent | b0821738ff40d35e9904bf5ea19218b03ccae31c (diff) |
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.
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/pam_elogind.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/pam_elogind.c b/src/login/pam_elogind.c index 9554ce606..6f941f836 100644 --- a/src/login/pam_elogind.c +++ b/src/login/pam_elogind.c @@ -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) { |