diff options
author | Laurent Bigonville <bigon@bigon.be> | 2015-06-15 15:30:16 +0200 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-08-06 17:12:41 +0100 |
commit | 517c4685a8197498dea40918b308beea19155efd (patch) | |
tree | f1cd03abf2e4d3b4c656d5f550ae42c693a72f39 | |
parent | 2602ca61c542280afff66c397172ebe951d28e74 (diff) | |
download | dbus-517c4685a8197498dea40918b308beea19155efd.tar.gz |
Initialize audit subsystem even for the session bus
If SELinux is enabled on the system, dbus will check the permissions but
no audit trails will be generated in case of denial as the audit
subsystem is not initialized. Same should apply for apparmor.
[smcv: without audit, the equivalent of the audit trail goes to stderr
where it can be picked up by systemd-journald]
A unprivileged user should be able to open the audit socket
(audit_open()) but should not have the permissions to log an audit
trail. The CAP_AUDIT_WRITE file capability could be set on the
dbus-daemon executable in order to allow the session bus to log an AVC
denial.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83856
[smcv: s/should/could/ in commit message to reflect lack of consensus that
"setcap cap_audit_write+ep dbus-daemon" is desirable in general]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | bus/bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -972,10 +972,10 @@ bus_context_new (const DBusString *config_file, _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } - - bus_audit_init (context); } + bus_audit_init (context); + dbus_server_free_data_slot (&server_data_slot); return context; |