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>
This commit is contained in:
parent
bcb17b9987
commit
a26578dbb9
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user