Blame SOURCES/audit-2.8.4-fix-hang.patch

5faf2a
diff -urp audit-2.8.4.orig/src/auditd.c audit-2.8.4/src/auditd.c
5faf2a
--- audit-2.8.4.orig/src/auditd.c	2018-05-21 13:38:08.000000000 -0400
5faf2a
+++ audit-2.8.4/src/auditd.c	2018-06-27 08:12:44.027716750 -0400
5faf2a
@@ -388,7 +388,7 @@ static int become_daemon(void)
5faf2a
 	if (do_fork) {
5faf2a
 		if (pipe(init_pipe) || 
5faf2a
 				fcntl(init_pipe[0], F_SETFD, FD_CLOEXEC) ||
5faf2a
-				fcntl(init_pipe[0], F_SETFD, FD_CLOEXEC))
5faf2a
+				fcntl(init_pipe[1], F_SETFD, FD_CLOEXEC))
5faf2a
 			return -1;
5faf2a
 		pid = fork();
5faf2a
 	} else
5faf2a
@@ -432,7 +432,9 @@ static int become_daemon(void)
5faf2a
 			break;
5faf2a
 		default:
5faf2a
 			/* Wait for the child to say its done */
5faf2a
-			rc = read(init_pipe[0], &status, sizeof(status));
5faf2a
+			do {
5faf2a
+				rc = read(init_pipe[0], &status,sizeof(status));
5faf2a
+			} while (rc < 0 && errno == EINTR);
5faf2a
 			if (rc < 0)
5faf2a
 				return -1;
5faf2a
 
5faf2a
diff -urp audit-2.8.4.orig/src/auditd-dispatch.c audit-2.8.4/src/auditd-dispatch.c
5faf2a
--- audit-2.8.4.orig/src/auditd-dispatch.c	2018-05-21 13:38:08.000000000 -0400
5faf2a
+++ audit-2.8.4/src/auditd-dispatch.c	2018-06-27 08:13:27.590712076 -0400
5faf2a
@@ -47,7 +47,6 @@ int dispatcher_pid(void)
5faf2a
 
5faf2a
 void dispatcher_reaped(void)
5faf2a
 {
5faf2a
-	audit_msg(LOG_INFO, "dispatcher %d reaped", pid);
5faf2a
 	pid = 0;
5faf2a
 	shutdown_dispatcher();
5faf2a
 }