diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-28 18:23:26 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-31 19:09:20 +0100 |
commit | a1a078eef248cd2aa7bc190d6296255a034acadc (patch) | |
tree | c605e2d6b3fe830affabf8204d07e6b9effea170 /src/core/manager.c | |
parent | 97044145b48fa5644ecd23e73bc33980faeabda3 (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/core/manager.c')
-rw-r--r-- | src/core/manager.c | 6 |
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; |