Skip to content

Commit

Permalink
selinux: don't transliterate MAY_NOT_BLOCK to IPERM_FLAG_RCU
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 20, 2011
1 parent e74f71e commit cf1dd1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ int avc_audit(u32 ssid, u32 tsid,
* happened a little later.
*/
if ((a->type == LSM_AUDIT_DATA_INODE) &&
(flags & IPERM_FLAG_RCU))
(flags & MAY_NOT_BLOCK))
return -ECHILD;

a->selinux_audit_data.tclass = tclass;
Expand Down
4 changes: 2 additions & 2 deletions security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ static int selinux_inode_permission(struct inode *inode, int mask)
struct common_audit_data ad;
u32 perms;
bool from_access;
unsigned __flags = mask & MAY_NOT_BLOCK ? IPERM_FLAG_RCU : 0;
unsigned flags = mask & MAY_NOT_BLOCK;

from_access = mask & MAY_ACCESS;
mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND);
Expand All @@ -2682,7 +2682,7 @@ static int selinux_inode_permission(struct inode *inode, int mask)

perms = file_mask_to_av(inode->i_mode, mask);

return inode_has_perm(cred, inode, perms, &ad, __flags);
return inode_has_perm(cred, inode, perms, &ad, flags);
}

static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
Expand Down

0 comments on commit cf1dd1d

Please sign in to comment.