Commit d124b60a838141bb9cac1b6567e9ca4539d1fff0

Authored by Andreas Gruenbacher
Committed by root
1 parent 8522ca5818

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>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -227,8 +227,6 @@
227 227 {
228 228 unsigned int mode = inode->i_mode;
229 229  
230   - mask &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK;
231   -
232 230 if (current_user_ns() != inode_userns(inode))
233 231 goto other_perms;
234 232  
... ... @@ -218,6 +218,8 @@
218 218 const struct posix_acl_entry *pa, *pe, *mask_obj;
219 219 int found = 0;
220 220  
  221 + want &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK;
  222 +
221 223 FOREACH_ACL_ENTRY(pa, acl, pe) {
222 224 switch(pa->e_tag) {
223 225 case ACL_USER_OBJ: