From 76fb5c8e6525f9ff32f19260f7595cae1c0e6c22 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 3 Feb 2012 10:31:53 -0500 Subject: [PATCH] avc_netlink_recieve should continue to poll if it receinves an EINTR rather --- libselinux-rhat.patch | 15 +++++++++++++++ libselinux.spec | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 7a50559..1149ef9 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -264,6 +264,21 @@ index 1ddddb0..985842d 100644 override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) RANLIB=ranlib +diff --git a/libselinux/src/avc_internal.c b/libselinux/src/avc_internal.c +index be4c0a3..a07aa7f 100644 +--- a/libselinux/src/avc_internal.c ++++ b/libselinux/src/avc_internal.c +@@ -101,7 +101,9 @@ static int avc_netlink_receive(char *buf, unsigned buflen, int blocking) + socklen_t nladdrlen = sizeof nladdr; + struct nlmsghdr *nlh = (struct nlmsghdr *)buf; + +- rc = poll(&pfd, 1, (blocking ? -1 : 0)); ++ do { ++ rc = poll(&pfd, 1, (blocking ? -1 : 0)); ++ } while (rc < 0 && errno == EINTR); + + if (rc == 0 && !blocking) { + errno = EWOULDBLOCK; diff --git a/libselinux/src/avc_internal.h b/libselinux/src/avc_internal.h index 53610e8..f851659 100644 --- a/libselinux/src/avc_internal.h diff --git a/libselinux.spec b/libselinux.spec index 1fd94e4..0253f32 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -7,7 +7,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.1.9 -Release: 5%{?dist} +Release: 6%{?dist} License: Public Domain Group: System Environment/Libraries Source: %{name}-%{version}.tgz @@ -232,6 +232,9 @@ rm -rf %{buildroot} %{ruby_sitearch}/selinux.so %changelog +* Fri Feb 3 2012 Dan Walsh - 2.1.9-6 +- avc_netlink_recieve should continue to poll if it receinves an EINTR rather + * Fri Jan 27 2012 Dan Walsh - 2.1.9-5 - Rebuild with cleaned up upstream to work in /usr