Commit 9777582e authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Casey Schaufler

Smack: ignore private inode for smack_file_receive

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.
Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
parent 1ddd3b4e
...@@ -1658,6 +1658,9 @@ static int smack_file_receive(struct file *file) ...@@ -1658,6 +1658,9 @@ static int smack_file_receive(struct file *file)
struct smk_audit_info ad; struct smk_audit_info ad;
struct inode *inode = file_inode(file); struct inode *inode = file_inode(file);
if (unlikely(IS_PRIVATE(inode)))
return 0;
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
smk_ad_setfield_u_fs_path(&ad, file->f_path); smk_ad_setfield_u_fs_path(&ad, file->f_path);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment