]> err.no Git - systemd/commitdiff
audit: suppress repeated audit events when deserializing
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Aug 2010 01:51:58 +0000 (03:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 12 Aug 2010 01:51:58 +0000 (03:51 +0200)
src/manager.c

index 3e742f791e1251b3a3f3e257cb1328e113140696..6640420fb76d5c5ca57765f866a1352ed8a518b5 100644 (file)
@@ -2260,6 +2260,11 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
         if (m->audit_fd < 0)
                 return;
 
+        /* Don't generate audit events if the service was already
+         * started and we're just deserializing */
+        if (m->n_deserializing > 0)
+                return;
+
         if (!(p = unit_name_to_prefix_and_instance(u->meta.id))) {
                 log_error("Failed to allocate unit name for audit message: %s", strerror(ENOMEM));
                 return;