summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-28 18:23:26 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-31 19:09:20 +0100
commita1a078eef248cd2aa7bc190d6296255a034acadc (patch)
treec605e2d6b3fe830affabf8204d07e6b9effea170 /src
parent97044145b48fa5644ecd23e73bc33980faeabda3 (diff)
core: bail our earlier when doing audit
Let's make sure we don't even try to create the audit socket
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c6
1 files changed, 3 insertions, 3 deletions
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;