Smack: pipefs fix in smack_d_instantiate
authorRoman Kubiak <r.kubiak@samsung.com>
Mon, 5 Oct 2015 10:27:16 +0000 (12:27 +0200)
committerCasey Schaufler <casey@schaufler-ca.com>
Fri, 9 Oct 2015 22:13:41 +0000 (15:13 -0700)
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 2c0579d0da20da80b61e93f8f838615a06a2ac2c..c2d66ca1127ab63d9130084087cd85dc1f1f9cb3 100644 (file)
@@ -3354,6 +3354,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;