Some CI environments run build-time tests as root with CAP_AUDIT_WRITE.
In this case we need to close the audit socket so that it will not be
reported as leaked.
Signed-off-by: Simon McVittie <smcv@collabora.com>
#include <dbus/dbus-test-tap.h>
+#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
+
+ bus_audit_shutdown ();
}
static DBusTestCase test = { "dispatch-sha1", bus_dispatch_sha1_test };
#include <dbus/dbus-test-tap.h>
+#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
+
+ bus_audit_shutdown ();
}
static DBusTestCase test = { "dispatch", bus_dispatch_test };
#include <dbus/dbus-test-tap.h>
+#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
+
+ bus_audit_shutdown ();
}
static DBusTestCase tests[] =