ngompa / rpms / sudo

Forked from rpms/sudo 2 years ago
Clone
7719973
diff -up sudo-1.8.11p2/plugins/sudoers/linux_audit.c.auditfix sudo-1.8.11p2/plugins/sudoers/linux_audit.c
7719973
--- sudo-1.8.11p2/plugins/sudoers/linux_audit.c.auditfix	2014-11-03 12:44:53.674230966 +0100
7719973
+++ sudo-1.8.11p2/plugins/sudoers/linux_audit.c	2014-11-03 12:45:13.407021599 +0100
7719973
@@ -57,10 +57,10 @@ linux_audit_open(void)
7719973
     au_fd = audit_open();
7719973
     if (au_fd == -1) {
7719973
 	/* Kernel may not have audit support. */
7719973
-	if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT) {
7719973
-	    sudo_warn(U_("unable to open audit system"));
7719973
+	if (errno == EINVAL || errno == EPROTONOSUPPORT || errno == EAFNOSUPPORT)
7719973
 	    au_fd = AUDIT_NOT_CONFIGURED;
7719973
-	}
7719973
+	else
7719973
+	    sudo_warn(U_("unable to open audit system"));
7719973
     } else {
7719973
 	(void)fcntl(au_fd, F_SETFD, FD_CLOEXEC);
7719973
     }