diff options
author | Ray Strode <rstrode@redhat.com> | 2014-04-24 13:38:29 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-04-30 08:56:35 -0700 |
commit | a26578dbb93dbaab1910b52f9fa1c87f8c9e6d1e (patch) | |
tree | a9ed50529115af2daf9065652e2f17363c2bc23f /Xext | |
parent | bcb17b99873f020f2639b860ce99d260def0cd97 (diff) |
selinux: don't checkout for AVCs on select() EINTR
wakeup handlers are called even when select() returns EINTR,
and when they're called the passed fd set is undefined.
This commit fixes the selinux wakeup handler to avoid checking
for AVCs over the netlink socket spuriously.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ray Strode <rstrode@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xselinux_hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c index 376d57518..48219a9e0 100644 --- a/Xext/xselinux_hooks.c +++ b/Xext/xselinux_hooks.c @@ -812,9 +812,9 @@ SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask) } static void -SELinuxWakeupHandler(void *data, int err, void *read_mask) +SELinuxWakeupHandler(void *data, int num_fds, void *read_mask) { - if (FD_ISSET(netlink_fd, (fd_set *) read_mask)) + if (num_fds > 0 && FD_ISSET(netlink_fd, (fd_set *) read_mask)) avc_netlink_check_nb(); } |