diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2015-04-22 11:23:26 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2015-05-12 08:38:59 +0900 |
commit | 34d04efe393231c3d3474d2d64a542c92485571a (patch) | |
tree | cd9071c0c60705b695fdcd0b3d2a60ccdace8799 | |
parent | 58a470c07dd3e22a1b30e7e459abad0213898e69 (diff) | |
download | linux-3.10-accepted/tizen/wearable/20150513.005517.tar.gz linux-3.10-accepted/tizen/wearable/20150513.005517.tar.bz2 linux-3.10-accepted/tizen/wearable/20150513.005517.zip |
Smack: ignore private inode for smack_file_receivesubmit/tizen/20150512.061658accepted/tizen/wearable/20150513.005517accepted/tizen/tv/20150513.005305accepted/tizen/mobile/20150513.005633accepted/tizen/common/20150512.125138
The dmabuf fd can be shared between processes via unix domain
socket. The file of dmabuf fd is came from anon_inode. The inode
has no set and get xattr operations, so it can not be shared
between processes with smack. This patch fixes just to ignore
private inode including anon_inode for smack_file_receive.
Change-Id: I2dca19baed08d1061e637160f653a86419a7ba6d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
-rw-r--r-- | security/smack/smack_lsm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index f9f89327896..c957320135e 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1362,6 +1362,9 @@ static int smack_file_receive(struct file *file) int may = 0; struct smk_audit_info ad; + if (unlikely(IS_PRIVATE(file_inode(file)))) + return 0; + smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); smk_ad_setfield_u_fs_path(&ad, file->f_path); /* |