BACKPORT: Smack: Verify read access on file open - v3
authorCasey Schaufler <casey@schaufler-ca.com>
Mon, 21 Apr 2014 18:10:26 +0000 (11:10 -0700)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:36 +0000 (14:57 +0200)
commita24886fcee3e13c62e990716e53f72c8a523ba9b
tree0bb5ef5c2d573acfd69c85ed58a0ebf2c1044f23
parente3c3bc5a9d8f6e331841f1c317736a57fb1d7852
BACKPORT: Smack: Verify read access on file open - v3

Smack believes that many of the operatons that can
be performed on an open file descriptor are read operations.
The fstat and lseek system calls are examples.
An implication of this is that files shouldn't be open
if the task doesn't have read access even if it has
write access and the file is being opened write only.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream a6834c0b9114c06106efee8e9f2a11fbbb104567)
security/smack/smack_lsm.c