Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201895
b: refs/heads/master
c: d09ca73
h: refs/heads/master
i:
  201893: 0339afb
  201891: 03db218
  201887: 8fdab4d
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Aug 2, 2010
1 parent 40c99aa commit 8538224
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 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: 9cfcac810e8993fa7a5bfd24b1a21f1dbbb03a7b
refs/heads/master: d09ca73979460b96d5d4684d588b188be9a1f57d
3 changes: 1 addition & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ int inode_permission(struct inode *inode, int mask)
if (retval)
return retval;

return security_inode_permission(inode,
mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
return security_inode_permission(inode, mask);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2645,6 +2645,8 @@ static int selinux_inode_permission(struct inode *inode, int mask)
{
const struct cred *cred = current_cred();

mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND);

if (!mask) {
/* No permission to check. Existence test. */
return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ static int smack_inode_rename(struct inode *old_inode,
static int smack_inode_permission(struct inode *inode, int mask)
{
struct smk_audit_info ad;

mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND);
/*
* No permission to check. Existence test. Yup, it's there.
*/
Expand Down

0 comments on commit 8538224

Please sign in to comment.