Magellan Linux

Contents of /trunk/systemd/patches/systemd-221-pam_systemd-properly-check-kdbus-availability.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2605 - (show annotations) (download)
Tue Jun 30 08:21:37 2015 UTC (8 years, 10 months ago) by niro
File size: 875 byte(s)
-upstream patches for 221
1 From c5d452bb228e9f97ebc96be98a957c0b7b8072eb Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3 Date: Sun, 21 Jun 2015 05:59:34 +0200
4 Subject: pam_systemd: Properly check kdbus availability
5
6 This properly avoids setting DBUS_SESSION_BUS_ADDRESS if kdbus
7 is loaded (or built into the kernel) but not wanted.
8
9 diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
10 index 0ebdfdf..dd192b9 100644
11 --- a/src/login/pam_systemd.c
12 +++ b/src/login/pam_systemd.c
13 @@ -181,7 +181,7 @@ static int export_legacy_dbus_address(
14 int r;
15
16 /* skip export if kdbus is not active */
17 - if (access("/sys/fs/kdbus", F_OK) < 0)
18 + if (!is_kdbus_available())
19 return PAM_SUCCESS;
20
21 if (asprintf(&s, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, uid, runtime) < 0) {
22 --
23 cgit v0.10.2
24