linux-bl808/security/selinux
Paolo Abeni 05174c95b8 selinux: do not report error on connect(AF_UNSPEC)
calling connect(AF_UNSPEC) on an already connected TCP socket is an
established way to disconnect() such socket. After commit 68741a8ada
("selinux: Fix ltp test connect-syscall failure") it no longer works
and, in the above scenario connect() fails with EAFNOSUPPORT.

Fix the above explicitly early checking for AF_UNSPEC family, and
returning success in that case.

Reported-by: Tom Deseyn <tdeseyn@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 68741a8ada ("selinux: Fix ltp test connect-syscall failure")
Suggested-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2019-05-20 21:46:02 -04:00
..
include selinux: try security xattr after genfs for kernfs filesystems 2019-03-20 21:53:04 -04:00
ss selinux: remove useless assignments 2019-03-25 10:25:06 -04:00
.gitignore
avc.c
hooks.c selinux: do not report error on connect(AF_UNSPEC) 2019-05-20 21:46:02 -04:00
ibpkey.c
Kconfig
Makefile
netif.c
netlabel.c selinux: avoid uninitialized variable warning 2019-03-25 10:34:35 -04:00
netlink.c
netnode.c
netport.c
nlmsgtab.c
selinuxfs.c
xfrm.c