Patchwork [BUG:1167,4/5] access-control: Fix O_CREATE determination check

login
register
Submitter Shehjar Tikoo
Date 2010-07-27 11:46:52
Message ID <1280231213-3137-4-git-send-email-shehjart@gluster.com>
Download mbox | patch
Permalink /patch/3923/
State Accepted
Delegated to: Anand Avati
Headers show

Comments

Shehjar Tikoo - 2010-07-27 11:46:52
From: Shehjar Tikoo <shehjart@gluster.com>


Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
---
 .../features/access-control/src/access-control.c   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/xlators/features/access-control/src/access-control.c b/xlators/features/access-control/src/access-control.c
index f90184d..5987adc 100644
--- a/xlators/features/access-control/src/access-control.c
+++ b/xlators/features/access-control/src/access-control.c
@@ -1372,7 +1372,7 @@  ac_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
         frame->local = stub;
         /* If we are not supposed to create the file then there is no need to
          * check the parent dir permissions. */
-        if (!(flags & O_CREAT))
+        if (flags & O_CREAT)
                 ret = ac_open_create (stub);
         else
                 ret = ac_open_only (stub);