diff options
author | shishir gowda <shishirng@gluster.com> | 2011-07-13 03:33:47 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-13 03:00:45 -0700 |
commit | e27c4da87295a210e77ca13ff23a24078abc25c0 (patch) | |
tree | 18a8d1b43b1987800eaab98118a48fb572ae9697 /xlators/system | |
parent | 4223545bdc67383e622d34ee878d3461ad4f63b0 (diff) |
access-control: Handle F_OK in perm check, and O_APPEND, O_TRUNC in open
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 3057 (acl permissions don't work on nfs mount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
BUG: 3057 (acl permissions don't work on nfs mount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
Diffstat (limited to 'xlators/system')
-rw-r--r-- | xlators/system/posix-acl/src/posix-acl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index 96cdf0882..8e6a750b3 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -779,6 +779,9 @@ posix_acl_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int mask) perm |= POSIX_ACL_WRITE; if (mask & X_OK) perm |= POSIX_ACL_EXECUTE; + if (!mask) { + goto unwind; + } if (!perm) { op_ret = -1; op_errno = EINVAL; @@ -871,6 +874,8 @@ posix_acl_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, perm = POSIX_ACL_READ; break; case O_WRONLY: + case O_APPEND: + case O_TRUNC: perm = POSIX_ACL_WRITE; break; case O_RDWR: |