summaryrefslogtreecommitdiff
path: root/bus/selinux.c
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2007-10-03 17:29:45 -0400
committerJohn (J5) Palmieri <johnp@redhat.com>2007-10-03 17:29:45 -0400
commit09aa69e0153e66326c6746ec7e4841567d44ccdb (patch)
treed15ece4f82530245aa08975e9089ae247b5ff6ed /bus/selinux.c
parenta295b2e66c9db7e7687e22414f93e171c29e495d (diff)
downloaddbus-09aa69e0153e66326c6746ec7e4841567d44ccdb.tar.gz
fd.o bug #12429 Reverse check to setpcap and only init audit if we were root
* patch by Dan Walsh <dwalsh@redhat.com> * https://bugs.freedesktop.org/show_bug.cgi?id=12429 * Reverse we_were_root check to setpcap if we were root. Also only init audit if we were root. So error dbus message will not show up when policy reload happens. dbus -session will no longer try to send audit message, only system will.
Diffstat (limited to 'bus/selinux.c')
-rw-r--r--bus/selinux.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bus/selinux.c b/bus/selinux.c
index 7fedba6f..8c7a6f83 100644
--- a/bus/selinux.c
+++ b/bus/selinux.c
@@ -113,7 +113,7 @@ static const struct avc_lock_callback lock_cb =
static int audit_fd = -1;
#endif
-static void
+void
audit_init(void)
{
#ifdef HAVE_LIBAUDIT
@@ -350,12 +350,8 @@ bus_selinux_full_init (void)
freecon (bus_context);
- audit_init ();
-
- return TRUE;
-#else
- return TRUE;
#endif /* HAVE_SELINUX */
+ return TRUE;
}
/**