From: Seung-Woo Kim Date: Wed, 9 Sep 2015 05:21:49 +0000 (+0900) Subject: WORKAROUND/Smack: ignore socket and pipe inods for smack_file_receive X-Git-Tag: submit/tizen/20150909.110847~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cebc3c498e30552957cb0c6739ce820093533bec;p=platform%2Fkernel%2Flinux-exynos.git WORKAROUND/Smack: ignore socket and pipe inods for smack_file_receive This patch fixes to ignore socket and pipe inode for smack_file_receive as workaround. It will be fixed on mainline smack and at that time this patch should be reverted. Change-Id: If5211b22b39c77e70597704fa06ae3f6276d0b8c Signed-off-by: Seung-Woo Kim --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index bb3f6041552d..0e2c7ae6ffa2 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1641,6 +1641,9 @@ static int smack_file_receive(struct file *file) if (unlikely(IS_PRIVATE(inode))) return 0; + if (unlikely(S_ISSOCK(inode->i_mode) || S_ISFIFO(inode->i_mode))) + return 0; + smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); smk_ad_setfield_u_fs_path(&ad, file->f_path); /*