diff options
author | Pranith K <pranithk@gluster.com> | 2011-01-24 01:49:23 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-01-26 23:42:21 -0800 |
commit | 40cdb88962cff1d32cd46cb089ad8bcd9be3d62d (patch) | |
tree | 44690b776d266e1253a9d84f714e6d72013713fd /libglusterfs | |
parent | 945ac04532d5efeeef324be485dcf2bade41708e (diff) |
features/access-control: skip access-tests if the call is from fuse
Fuse cant send aux gids. So access-control checks treat
non-primary-group membership of user as "other". So skip
access-control checks if the call is from fuse. We added a hack to
treat all calls with pid set to 1 as calls from nfs. So for calls with pid
not 1 we skip the access-control checks on all fops.
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2296 (svn / subversion fails on gluster volume (replicated and non-replicated))
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2296
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/stack.c | 11 | ||||
-rw-r--r-- | libglusterfs/src/stack.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.c b/libglusterfs/src/stack.c index b2659c57f..53c21f7c6 100644 --- a/libglusterfs/src/stack.c +++ b/libglusterfs/src/stack.c @@ -163,3 +163,14 @@ gf_proc_dump_pending_frames (call_pool_t *call_pool) UNLOCK (&(call_pool->lock)); } +gf_boolean_t +__is_fuse_call (call_frame_t *frame) +{ + gf_boolean_t is_fuse_call = _gf_false; + GF_ASSERT (frame); + GF_ASSERT (frame->root); + + if (NFS_PID != frame->root->pid) + is_fuse_call = _gf_true; + return is_fuse_call; +} diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index b06470bf5..f06267c38 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -45,6 +45,7 @@ typedef struct _call_pool_t call_pool_t; #include "common-utils.h" #include "globals.h" +#define NFS_PID 1 typedef int32_t (*ret_fn_t) (call_frame_t *frame, call_frame_t *prev_frame, xlator_t *this, @@ -363,4 +364,6 @@ create_frame (xlator_t *xl, call_pool_t *pool) void gf_proc_dump_pending_frames(call_pool_t *call_pool); +gf_boolean_t +__is_fuse_call (call_frame_t *frame); #endif /* _STACK_H */ |