summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-12 03:51:58 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-12 03:51:58 +0200
commitbbd3a7ba5c91af7f84be29429e96f15dbe36ca48 (patch)
tree0904b2ad31cf6ff243795221af286e44a68e224a /src
parent8821a00fd5b8cb349bce66816c213573db05ec46 (diff)
audit: suppress repeated audit events when deserializing
Diffstat (limited to 'src')
-rw-r--r--src/manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/manager.c b/src/manager.c
index 3e742f791e..6640420fb7 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -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;