diff options
| author | Paolo Abeni <[email protected]> | 2019-05-10 17:12:33 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2019-05-21 01:46:02 +0000 |
| commit | 05174c95b83f8aca0c47b87115abb7a6387aafa5 (patch) | |
| tree | aaade5942a3d2f9f4406355207da7db63ae1913e /lib/test_stackinit.c | |
| parent | proc: prevent changes to overridden credentials (diff) | |
| download | kernel-05174c95b83f8aca0c47b87115abb7a6387aafa5.tar.gz kernel-05174c95b83f8aca0c47b87115abb7a6387aafa5.zip | |
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 68741a8adab9
("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 <[email protected]>
Cc: [email protected]
Fixes: 68741a8adab9 ("selinux: Fix ltp test connect-syscall failure")
Suggested-by: Paul Moore <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'lib/test_stackinit.c')
0 files changed, 0 insertions, 0 deletions
