Skip to content

Commit 387ef96

Browse files
Vishal Goelcschaufler
authored andcommitted
Smack:- Use overlay inode label in smack_inode_copy_up()
Currently in "smack_inode_copy_up()" function, process label is changed with the label on parent inode. Due to which, process is assigned directory label and whatever file or directory created by the process are also getting directory label which is wrong label. Changes has been done to use label of overlay inode instead of parent inode. Signed-off-by: Vishal Goel <[email protected]> Signed-off-by: Casey Schaufler <[email protected]>
1 parent 222a96b commit 387ef96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/smack/smack_lsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4637,7 +4637,7 @@ static int smack_inode_copy_up(struct dentry *dentry, struct cred **new)
46374637
/*
46384638
* Get label from overlay inode and set it in create_sid
46394639
*/
4640-
isp = smack_inode(d_inode(dentry->d_parent));
4640+
isp = smack_inode(d_inode(dentry));
46414641
skp = isp->smk_inode;
46424642
tsp->smk_task = skp;
46434643
*new = new_creds;

0 commit comments

Comments
 (0)