[systemd-commits] src/login
Kay Sievers
kay at kemper.freedesktop.org
Sat Jan 11 09:49:59 PST 2014
src/login/pam-module.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 8042e377b8bb8f79b7da2dff89d2247ce1f74b66
Author: Kay Sievers <kay at vrfy.org>
Date: Sun Jan 12 01:18:41 2014 +0800
pam: skip DBUS_SESSION_BUS_ADDRESS export when kdbus is not active
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index e76fef8..7400734 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -173,6 +173,10 @@ static int export_legacy_dbus_address(
_cleanup_free_ char *s = NULL;
int r;
+ /* skip export if kdbus is not active */
+ if (access("/dev/kdbus", F_OK) < 0)
+ return PAM_SUCCESS;
+
if (asprintf(&s, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT,
(unsigned long) uid, runtime) < 0) {
pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
More information about the systemd-commits
mailing list