core: bail our earlier when doing audit
Let's make sure we don't even try to create the audit socket
This commit is contained in:
parent
97044145b4
commit
a1a078eef2
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue