avc_netlink_recieve should continue to poll if it receinves an EINTR rather
This commit is contained in:
parent
86fcde8ff1
commit
76fb5c8e65
@ -264,6 +264,21 @@ index 1ddddb0..985842d 100644
|
|||||||
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS)
|
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS)
|
||||||
RANLIB=ranlib
|
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
|
diff --git a/libselinux/src/avc_internal.h b/libselinux/src/avc_internal.h
|
||||||
index 53610e8..f851659 100644
|
index 53610e8..f851659 100644
|
||||||
--- a/libselinux/src/avc_internal.h
|
--- a/libselinux/src/avc_internal.h
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.1.9
|
Version: 2.1.9
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: %{name}-%{version}.tgz
|
Source: %{name}-%{version}.tgz
|
||||||
@ -232,6 +232,9 @@ rm -rf %{buildroot}
|
|||||||
%{ruby_sitearch}/selinux.so
|
%{ruby_sitearch}/selinux.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 3 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.9-6
|
||||||
|
- avc_netlink_recieve should continue to poll if it receinves an EINTR rather
|
||||||
|
|
||||||
* Fri Jan 27 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.9-5
|
* Fri Jan 27 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.9-5
|
||||||
- Rebuild with cleaned up upstream to work in /usr
|
- Rebuild with cleaned up upstream to work in /usr
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user