From: Ray Strode <[email protected]> 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 <[email protected]> Signed-off-by: Ray Strode <[email protected]> --- Xext/xselinux_hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c index 376d575..48219a9 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(); } -- 1.8.5.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
