diff options
author | James Morris <jmorris@namei.org> | 2011-01-10 10:40:42 +1100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-01-10 10:40:42 +1100 |
commit | aeda4ac3efc29e4d55989abd0a73530453aa69ba (patch) | |
tree | 35b3d2cca8bfb49cf08bf1c6b55b586c1e5971e7 /security/selinux/hooks.c | |
parent | d2e7ad19229f982fc1eb731827d82ceac90abfb3 (diff) | |
parent | 350e4f31e0eaf56dfc3b328d24a11bdf42a41fb8 (diff) | |
download | kernel_goldelico_gta04-aeda4ac3efc29e4d55989abd0a73530453aa69ba.zip kernel_goldelico_gta04-aeda4ac3efc29e4d55989abd0a73530453aa69ba.tar.gz kernel_goldelico_gta04-aeda4ac3efc29e4d55989abd0a73530453aa69ba.tar.bz2 |
Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 6f637d2..e276eb4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2525,7 +2525,10 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir, sid = tsec->sid; newsid = tsec->create_sid; - if (!newsid || !(sbsec->flags & SE_SBLABELSUPP)) { + if ((sbsec->flags & SE_SBINITIALIZED) && + (sbsec->behavior == SECURITY_FS_USE_MNTPOINT)) + newsid = sbsec->mntpoint_sid; + else if (!newsid || !(sbsec->flags & SE_SBLABELSUPP)) { rc = security_transition_sid(sid, dsec->sid, inode_mode_to_security_class(inode->i_mode), &newsid); |