From a1a078eef248cd2aa7bc190d6296255a034acadc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Oct 2015 18:23:26 +0100 Subject: core: bail our earlier when doing audit Let's make sure we don't even try to create the audit socket --- src/core/manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/manager.c b/src/core/manager.c index 5fdeb4a99c..2039dafea1 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2110,6 +2110,9 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) { const char *msg; int audit_fd, r; + if (m->running_as != MANAGER_SYSTEM) + return; + audit_fd = get_audit_fd(); if (audit_fd < 0) return; @@ -2119,9 +2122,6 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) { if (m->n_reloading > 0) return; - if (m->running_as != MANAGER_SYSTEM) - return; - if (u->type != UNIT_SERVICE) return; -- cgit v1.2.3-54-g00ecf