chiark / gitweb /
audit: do not complain if kernel lacks audit
[elogind.git] / src / update-utmp.c
index f81e7f495f864c25949c2bafdbec0878b32ae34d..12e4d110425c2050f09edb7e14a5a581b7ee2ec7 100644 (file)
@@ -376,7 +376,10 @@ int main(int argc, char *argv[]) {
         umask(0022);
 
 #ifdef HAVE_AUDIT
-        if ((c.audit_fd = audit_open()) < 0)
+        if ((c.audit_fd = audit_open()) < 0 &&
+            /* If the kernel lacks netlink or audit support,
+             * don't worry about it. */
+            errno != EAFNOSUPPORT && errno != EPROTONOSUPPORT)
                 log_error("Failed to connect to audit log: %m");
 #endif