selinux: Fix ltp test connect-syscall failure
authorRichard Haines <richard_c_haines@btinternet.com>
Fri, 2 Mar 2018 19:54:34 +0000 (19:54 +0000)
committerPaul Moore <paul@paul-moore.com>
Fri, 2 Mar 2018 21:09:09 +0000 (16:09 -0500)
commit68741a8adab900fafb407532e6bae0887f14fbe0
treec5c9d56e701ff3154d4f5c262d95c4953fb0eca7
parente5a5ca96a42ca7eee19cf8694377308771350950
selinux: Fix ltp test connect-syscall failure

Fix the following error when running regression tests using LTP as follows:
cd /opt/ltp/
cat runtest/syscalls |grep connect01>runtest/connect-syscall
./runltp -pq -f connect-syscall

Running tests.......
connect01    1  TPASS  :  bad file descriptor successful
connect01    2  TPASS  :  invalid socket buffer successful
connect01    3  TPASS  :  invalid salen successful
connect01    4  TPASS  :  invalid socket successful
connect01    5  TPASS  :  already connected successful
connect01    6  TPASS  :  connection refused successful
connect01    7  TFAIL  :  connect01.c:146: invalid address family ;
returned -1 (expected -1), errno 22 (expected 97)
INFO: ltp-pan reported some tests FAIL
LTP Version: 20180118

Reported-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c