Smack: Safer check for a socket in file_receive
authorCasey Schaufler <casey@schaufler-ca.com>
Wed, 31 May 2017 15:53:42 +0000 (08:53 -0700)
committerCasey Schaufler <casey@schaufler-ca.com>
Thu, 1 Jun 2017 16:27:12 +0000 (09:27 -0700)
commit51d59af26fe81967e0d7ec92bd9381d3b26434f3
treed43e2610710a1f4c82283120df19fe593ed77de0
parente661a58279132da0127c67705e59d12f6027858d
Smack: Safer check for a socket in file_receive

The check of S_ISSOCK() in smack_file_receive() is not
appropriate if the passed descriptor is a socket.

Reported-by: Stephen Smalley <sds@tyco.nsa.gov>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c