SHA256
1
0
forked from pool/systemd
systemd/0006-pam_systemd-Properly-check-kdbus-availability.patch

28 lines
965 B
Diff
Raw Normal View History

From c5d452bb228e9f97ebc96be98a957c0b7b8072eb Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Sun, 21 Jun 2015 05:59:34 +0200
Subject: [PATCH 06/32] 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.
---
src/login/pam_systemd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
index 0ebdfdf..dd192b9 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.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) {
--
2.4.3