diff options
author | Andreas Gruenbacher <agruen@kernel.org> | 2011-10-23 13:43:32 -0400 |
---|---|---|
committer | root <root@serles.lst.de> | 2011-10-28 08:58:54 -0400 |
commit | d124b60a838141bb9cac1b6567e9ca4539d1fff0 (patch) | |
tree | aefe6f38e9617b0a878dac1db2bc65981fbc216a /fs | |
parent | 8522ca5818652c4da6808c66a307abce75462212 (diff) |
vfs: pass all mask flags check_acl and posix_acl_permission
Acked-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 2 | ||||
-rw-r--r-- | fs/posix_acl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 2a4574f48001..276cd30ab8f8 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -227,8 +227,6 @@ static int acl_permission_check(struct inode *inode, int mask) | |||
227 | { | 227 | { |
228 | unsigned int mode = inode->i_mode; | 228 | unsigned int mode = inode->i_mode; |
229 | 229 | ||
230 | mask &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK; | ||
231 | |||
232 | if (current_user_ns() != inode_userns(inode)) | 230 | if (current_user_ns() != inode_userns(inode)) |
233 | goto other_perms; | 231 | goto other_perms; |
234 | 232 | ||
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 10027b42b7e2..cea4623f1ed6 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
@@ -218,6 +218,8 @@ posix_acl_permission(struct inode *inode, const struct posix_acl *acl, int want) | |||
218 | const struct posix_acl_entry *pa, *pe, *mask_obj; | 218 | const struct posix_acl_entry *pa, *pe, *mask_obj; |
219 | int found = 0; | 219 | int found = 0; |
220 | 220 | ||
221 | want &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK; | ||
222 | |||
221 | FOREACH_ACL_ENTRY(pa, acl, pe) { | 223 | FOREACH_ACL_ENTRY(pa, acl, pe) { |
222 | switch(pa->e_tag) { | 224 | switch(pa->e_tag) { |
223 | case ACL_USER_OBJ: | 225 | case ACL_USER_OBJ: |