Hello,
This bug seems already fixed in the hg repository (change #9723)
changeset: 9723:6f0d8f1c7648
tag: tip
user: Todd C. Miller <[email protected]>
date: Mon Oct 13 08:33:25 2014 -0600
summary: Fix logic bug. We only want to return -1 from linux_audit_open()
I've attached the patch here.
Cheers,
Laurent Bigonville
diff -r a3dfc76ee776 -r 6f0d8f1c7648 plugins/sudoers/linux_audit.c
--- a/plugins/sudoers/linux_audit.c Sat Oct 11 16:45:07 2014 -0600
+++ b/plugins/sudoers/linux_audit.c Mon Oct 13 08:33:25 2014 -0600
@@ -57,10 +57,10 @@
au_fd = audit_open();
if (au_fd == -1) {
/* Kernel may not have audit support. */
- if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT) {
+ if (errno == EINVAL || errno == EPROTONOSUPPORT || errno == EAFNOSUPPORT)
+ au_fd = AUDIT_NOT_CONFIGURED;
+ else
sudo_warn(U_("unable to open audit system"));
- au_fd = AUDIT_NOT_CONFIGURED;
- }
} else {
(void)fcntl(au_fd, F_SETFD, FD_CLOEXEC);
}