]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Throw a warning if we cannot open the audit socket as a session bus
authorLaurent Bigonville <bigon@bigon.be>
Mon, 15 Jun 2015 13:31:58 +0000 (15:31 +0200)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 6 Aug 2015 16:12:47 +0000 (17:12 +0100)
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.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83856
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/audit.c

index 98f7d7b7303b5b8e5e45d404b7b51b9f95a43e6c..954afa718569f7d570e86fceeb5bfcd1bee132b7 100644 (file)
@@ -67,10 +67,6 @@ bus_audit_init (BusContext *context)
       if (e == EINVAL || e == EPROTONOSUPPORT || e == EAFNOSUPPORT)
         return;
 
-      /* If user bus, bail out */
-      if (e == EPERM && getuid () != 0)
-        return;
-
       bus_context_log (context, DBUS_SYSTEM_LOG_WARNING,
                        "Failed to open connection to the audit subsystem: %s",
                        _dbus_strerror (e));