From 6cbca32b17568ef3f4da95df90bd45666e10b9a5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 15 Sep 2014 11:25:39 +0200 Subject: [PATCH 2/2] Throw a warning if we cannot open the audit socket as a session bus This will effectively print a warning when failing to open the audit socket running as a session bus. The call to audit_open() should succeed even if the dbus-daemon doesn't have the CAP_AUDIT_WRITE capability. https://bugs.freedesktop.org/show_bug.cgi?id=83856 --- bus/selinux.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/bus/selinux.c b/bus/selinux.c index 99994ca..56416b4 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -130,9 +130,6 @@ bus_selinux_audit_init(void) /* If kernel doesn't support audit, bail out */ if (errno == EINVAL || errno == EPROTONOSUPPORT || errno == EAFNOSUPPORT) return; - /* If user bus, bail out */ - if (errno == EPERM && getuid() != 0) - return; _dbus_warn ("Failed opening connection to the audit subsystem"); } #endif /* HAVE_LIBAUDIT */ -- 2.1.0