From 79d860fe78ff9e53fe3150fb55a8a8b03c4f6470 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 26 Mar 2013 11:36:31 +0100 Subject: PAM, uaccess: check for logind, not for systemd It is possible to build systemd without logind or run logind without systemd init. Commit 66e41181 fixed sd_booted() to only succeed for systemd init; with that, testing for systemd init is wrong in the parts that talk to logind. In particular, this affects the PAM module and the "uaccess" udev builtin. Change sd_booted() to a new logind_running() which tests for /run/systemd/seats/. For details, see: https://bugs.freedesktop.org/show_bug.cgi?id=62754 --- src/udev/udev-builtin-uaccess.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/udev/udev-builtin-uaccess.c') diff --git a/src/udev/udev-builtin-uaccess.c b/src/udev/udev-builtin-uaccess.c index 662bac9e0b..354ee08f28 100644 --- a/src/udev/udev-builtin-uaccess.c +++ b/src/udev/udev-builtin-uaccess.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "logind-acl.h" #include "udev.h" @@ -49,7 +48,7 @@ static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool umask(0022); /* don't muck around with ACLs when the system is not running systemd */ - if (!sd_booted()) + if (!logind_running()) return 0; path = udev_device_get_devnode(dev); -- cgit v1.2.3-54-g00ecf