]> granicus.if.org Git - sudo/commitdiff
Ignore ECONNREFUSED from audit_log_user_command() which will
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 21 Sep 2010 11:56:16 +0000 (07:56 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 21 Sep 2010 11:56:16 +0000 (07:56 -0400)
occur if auditd is not running.

plugins/sudoers/linux_audit.c

index b7a94bb22df3ae7494d3e974f6e1183917de3066..7505f69ca8fe945ea70340452d7c910262006248 100644 (file)
@@ -81,9 +81,9 @@ linux_audit_command(char *argv[], int result)
     }
     *--cp = '\0';
 
-    /* Log command, ignoring EPERM on error. */
+    /* Log command, ignoring ECONNREFUSED on error. */
     rc = audit_log_user_command(au_fd, AUDIT_USER_CMD, command, NULL, result);
-    if (rc <= 0)
+    if (rc <= 0 && errno != ECONNREFUSED)
        warning("unable to send audit message");
 
     efree(command);