Smack: Verify read access on file open - v3 91/212291/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.033829 accepted/tizen/5.5/unified/mobile/hotfix/20201027.070928 accepted/tizen/5.5/unified/wearable/hotfix/20201027.094753 accepted/tizen/unified/20190821.111104 submit/tizen/20190821.055225 submit/tizen_5.5/20191031.000010 submit/tizen_5.5/20191031.000011 submit/tizen_5.5/20191031.000013 submit/tizen_5.5_mobile_hotfix/20201026.185109 submit/tizen_5.5_wearable_hotfix/20201026.184309 tizen_5.5.m2_release
authorCasey Schaufler <casey@schaufler-ca.com>
Mon, 21 Apr 2014 18:10:26 +0000 (11:10 -0700)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 20 Aug 2019 03:36:46 +0000 (12:36 +0900)
commit2c3238acff9692ab49a7dc02d86fd4239f70eeab
tree8972dee410122da952404c6ed84e77b95061b6b3
parent3e1de71e17a61f2c8698ded47afd8ac1518880ab
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>
[sw0312.kim: cherry-pick mainline commit a6834c0b9114 to apply open to read access]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ifafc642de9393f45e2b0aabd94bb1058bbe99af6
security/smack/smack_lsm.c