diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/manager.c | 5 | ||||
-rw-r--r-- | src/update-utmp.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c index 6d20258893..111167a8c2 100644 --- a/src/manager.c +++ b/src/manager.c @@ -286,7 +286,10 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) { goto fail; #ifdef HAVE_AUDIT - if ((m->audit_fd = audit_open()) < 0) + if ((m->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 diff --git a/src/update-utmp.c b/src/update-utmp.c index f81e7f495f..12e4d11042 100644 --- a/src/update-utmp.c +++ b/src/update-utmp.c @@ -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 |