chiark / gitweb /
audit: ignore if we get EPERM
[elogind.git] / src / core / manager.c
index 869c99f5c5685bd719a1c4b965d20cd98c13d118..1d32adff6d6882f5e81e88386535bbbcefc2a2a6 100644 (file)
@@ -2611,17 +2611,13 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
         }
 
         if (audit_log_user_comm_message(m->audit_fd, type, "", p, NULL, NULL, NULL, success) < 0) {
-                log_warning("Failed to send audit message: %m");
-
                 if (errno == EPERM) {
                         /* We aren't allowed to send audit messages?
-                         * Then let's not retry again, to avoid
-                         * spamming the user with the same and same
-                         * messages over and over. */
-
+                         * Then let's not retry again. */
                         audit_close(m->audit_fd);
                         m->audit_fd = -1;
-                }
+                } else
+                        log_warning("Failed to send audit message: %m");
         }
 
         free(p);