aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 6149633ff715..9f8e9b2e717a 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2908,7 +2908,10 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
2908 return; 2908 return;
2909 } 2909 }
2910 2910
2911 isec->sclass = inode_mode_to_security_class(inode->i_mode);
2911 isec->sid = newsid; 2912 isec->sid = newsid;
2913 isec->initialized = 1;
2914
2912 return; 2915 return;
2913} 2916}
2914 2917
@@ -2996,6 +2999,7 @@ static int selinux_inode_setsecurity(struct inode *inode, const char *name,
2996 if (rc) 2999 if (rc)
2997 return rc; 3000 return rc;
2998 3001
3002 isec->sclass = inode_mode_to_security_class(inode->i_mode);
2999 isec->sid = newsid; 3003 isec->sid = newsid;
3000 isec->initialized = 1; 3004 isec->initialized = 1;
3001 return 0; 3005 return 0;