summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.c
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2011-01-24 01:49:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-01-26 23:42:21 -0800
commit40cdb88962cff1d32cd46cb089ad8bcd9be3d62d (patch)
tree44690b776d266e1253a9d84f714e6d72013713fd /libglusterfs/src/stack.c
parent945ac04532d5efeeef324be485dcf2bade41708e (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/src/stack.c')
-rw-r--r--libglusterfs/src/stack.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.c b/libglusterfs/src/stack.c
index b2659c57fe3..53c21f7c625 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;
+}