Smack: pipefs fix in smack_d_instantiate
authorRoman Kubiak <r.kubiak@samsung.com>
Mon, 5 Oct 2015 10:27:16 +0000 (12:27 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 31 Mar 2016 07:40:52 +0000 (16:40 +0900)
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>
security/smack/smack_lsm.c

index 39dbf6e8f22b56ae3b2c13dfef08654021f2f1e8..db29b6ec29c693f29362ec0176ed47da324fbc0d 100644 (file)
@@ -3292,6 +3292,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;