Smack: ignore private inode for file functions
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 12 Dec 2016 08:35:26 +0000 (17:35 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 2 Dec 2020 04:43:04 +0000 (13:43 +0900)
commit36f8f5d96b9a8f658fcd6737033bcfe2ae5b6b52
treeb53bf2b3838e3eba012904a895271d0dd97f96de
parentd044c853864c18b7e83ce8d327157df19809b12a
Smack: ignore private inode for file functions

The access to fd from anon_inode is always failed because there is
no set xattr operations. So this patch fixes to ignore private
inode including anon_inode for file functions.

It was only ignored for smack_file_receive() to share dma-buf fd,
but dma-buf has other functions like ioctl and mmap.

Reference: https://lkml.org/lkml/2015/4/17/16

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[sw0312.kim: backport mainline commit 83a1e53f3920 for Tizen security smack]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I31719d13885b63ebd643fe03565314ad7d65ee3c
security/smack/smack_lsm.c