From 2a9306815cf928f03fdec31a6b104efd7140ada8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 16 2018 12:47:05 +0000 Subject: import audit-2.8.1-3.el7_5.1 --- diff --git a/SOURCES/audit-2.8.4-fix-hang.patch b/SOURCES/audit-2.8.4-fix-hang.patch new file mode 100644 index 0000000..c51dca1 --- /dev/null +++ b/SOURCES/audit-2.8.4-fix-hang.patch @@ -0,0 +1,34 @@ +diff -urp audit-2.8.4.orig/src/auditd.c audit-2.8.4/src/auditd.c +--- audit-2.8.4.orig/src/auditd.c 2018-05-21 13:38:08.000000000 -0400 ++++ audit-2.8.4/src/auditd.c 2018-06-27 08:12:44.027716750 -0400 +@@ -388,7 +388,7 @@ static int become_daemon(void) + if (do_fork) { + if (pipe(init_pipe) || + fcntl(init_pipe[0], F_SETFD, FD_CLOEXEC) || +- fcntl(init_pipe[0], F_SETFD, FD_CLOEXEC)) ++ fcntl(init_pipe[1], F_SETFD, FD_CLOEXEC)) + return -1; + pid = fork(); + } else +@@ -432,7 +432,9 @@ static int become_daemon(void) + break; + default: + /* Wait for the child to say its done */ +- rc = read(init_pipe[0], &status, sizeof(status)); ++ do { ++ rc = read(init_pipe[0], &status,sizeof(status)); ++ } while (rc < 0 && errno == EINTR); + if (rc < 0) + return -1; + +diff -urp audit-2.8.4.orig/src/auditd-dispatch.c audit-2.8.4/src/auditd-dispatch.c +--- audit-2.8.4.orig/src/auditd-dispatch.c 2018-05-21 13:38:08.000000000 -0400 ++++ audit-2.8.4/src/auditd-dispatch.c 2018-06-27 08:13:27.590712076 -0400 +@@ -47,7 +47,6 @@ int dispatcher_pid(void) + + void dispatcher_reaped(void) + { +- audit_msg(LOG_INFO, "dispatcher %d reaped", pid); + pid = 0; + shutdown_dispatcher(); + } diff --git a/SPECS/audit.spec b/SPECS/audit.spec index ad10844..deca77f 100644 --- a/SPECS/audit.spec +++ b/SPECS/audit.spec @@ -3,7 +3,7 @@ Summary: User space tools for 2.6 kernel auditing Name: audit Version: 2.8.1 -Release: 3%{?dist} +Release: 3%{?dist}.1 License: GPLv2+ Group: System Environment/Daemons URL: http://people.redhat.com/sgrubb/audit/ @@ -20,6 +20,8 @@ Patch4: audit-2.8.2-ipv6-bind.patch Patch5: audit-2.8.2-fix-reset-lost-return.patch # This patch makes date a numeric field so auparse_search works Patch6: audit-2.8.2-auparse-numeric_field.patch +# This patch fixes a hang during daemon start up (#1607298) +Patch7: audit-2.8.4-fix-hang.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openldap-devel BuildRequires: swig @@ -99,6 +101,7 @@ like relay events to remote machines. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %configure --sbindir=/sbin --libdir=/%{_lib} --with-python=yes \ @@ -274,6 +277,9 @@ fi %attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz %changelog +* Mon Jul 23 2018 Steve Grubb 2.8.1-3.el7_5.1 +resolves: #1607298 - auditd sometimes in failed state after boot + * Tue Dec 12 2017 Steve Grubb 2.8.1-3 resolves: #1399314 - Allow non-equality comparisons for uid and gid fields