Package: systemd Version: 29-1.1 Severity: wishlist Tags: upstream Hi,
-- >8 -- When running on a kernel without audit support, systemd currently writes a mysterious-sounding error to its log: systemd[1]: Failed to connect to audit log: Protocol not supported Better to suppress the audit_open() failure message when (and only when) it is due to running on a kernel without audit support, since in this case the admin probably does not mind systemd not writing to the audit log. This way, more serious errors like ENOMEM and EACCES will stand out more. --- Compile-tested only. Sane? src/manager.c | 5 ++++- src/update-utmp.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/manager.c b/src/manager.c index 68d43ada..e7cbd749 100644 --- a/src/manager.c +++ b/src/manager.c @@ -274,7 +274,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 b06f5a06..e8510cce 100644 --- a/src/update-utmp.c +++ b/src/update-utmp.c @@ -374,7 +374,10 @@ int main(int argc, char *argv[]) { log_open(); #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 -- 1.7.7.rc1 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org