Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132575
b: refs/heads/master
c: cd89596
h: refs/heads/master
i:
  132573: ab38cdd
  132571: 4023f42
  132567: 15a5a4d
  132559: 6c6c8f5
  132543: 14a3e09
v: v3
  • Loading branch information
David P. Quigley authored and James Morris committed Jan 18, 2009
1 parent 2862390 commit 6031f9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11689d47f0957121920c9ec646eb5d838755853a
refs/heads/master: cd89596f0ccfa3ccb8a81ce47782231cf7ea7296
8 changes: 4 additions & 4 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ static int may_create(struct inode *dir,
if (rc)
return rc;

if (!newsid || sbsec->behavior == SECURITY_FS_USE_MNTPOINT) {
if (!newsid || !(sbsec->flags & SE_SBLABELSUPP)) {
rc = security_transition_sid(sid, dsec->sid, tclass, &newsid);
if (rc)
return rc;
Expand Down Expand Up @@ -2597,7 +2597,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
sid = tsec->sid;
newsid = tsec->create_sid;

if (!newsid || sbsec->behavior == SECURITY_FS_USE_MNTPOINT) {
if (!newsid || !(sbsec->flags & SE_SBLABELSUPP)) {
rc = security_transition_sid(sid, dsec->sid,
inode_mode_to_security_class(inode->i_mode),
&newsid);
Expand All @@ -2619,7 +2619,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
isec->initialized = 1;
}

if (!ss_initialized || sbsec->behavior == SECURITY_FS_USE_MNTPOINT)
if (!ss_initialized || !(sbsec->flags & SE_SBLABELSUPP))
return -EOPNOTSUPP;

if (name) {
Expand Down Expand Up @@ -2796,7 +2796,7 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
return selinux_inode_setotherxattr(dentry, name);

sbsec = inode->i_sb->s_security;
if (sbsec->behavior == SECURITY_FS_USE_MNTPOINT)
if (!(sbsec->flags & SE_SBLABELSUPP))
return -EOPNOTSUPP;

if (!is_owner_or_cap(inode))
Expand Down

0 comments on commit 6031f9c

Please sign in to comment.