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:
Lennart Poettering
2015-10-31 19:09:20 +01:00
parent 97044145b4
commit a1a078eef2
+3 -3
View File
@@ -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;