summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRoman Kubiak <r.kubiak@samsung.com>2015-10-05 12:27:16 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:48:26 +0900
commit1a5aa3e0189acd076f8c39e696cdaf0b6e2bbe19 (patch)
tree37bf7345a573616d2a7992e3fa1a33cc90057407 /security
parentb88e01fcb93cfc5f261845be7af0d0367d8773f1 (diff)
Smack: pipefs fix in smack_d_instantiate
This fix writes the task label when smack_d_instantiate is called, before the label of the superblock was written on the pipe's inode. Signed-off-by: Roman Kubiak <r.kubiak@samsung.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smack_lsm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index e515d13c2c8a..147e5dac8a77 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -3290,6 +3290,9 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
*/
isp->smk_inode = smk_of_current();
break;
+ case PIPEFS_MAGIC:
+ isp->smk_inode = smk_of_current();
+ break;
default:
isp->smk_inode = sbsp->smk_root;
break;