diff options
Diffstat (limited to 'xlators/system/posix-acl/src/posix-acl.c')
-rw-r--r-- | xlators/system/posix-acl/src/posix-acl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index 9b3698618fa..dbe0e716e2b 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -1203,8 +1203,6 @@ posix_acl_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, break; case O_WRONLY: - case O_APPEND: - case O_TRUNC: perm = POSIX_ACL_WRITE; break; case O_RDWR: @@ -1212,6 +1210,9 @@ posix_acl_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, break; } + if (flags & (O_TRUNC | O_APPEND)) + perm |= POSIX_ACL_WRITE; + if (acl_permits (frame, loc->inode, perm)) goto green; else |