summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;