From 5821d2cf591789760e790d4af0575d1b9754c08d Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 3 Dec 2009 05:15:09 +0000 Subject: core, client, server: Support auxiliary group ids Support for auxiliary group ids is needed for transmission of more than one group id right through the xlator tree so that posix can use these group ids to perform in-house permission tests. The in-house permission checks are needed so that we do not have to depend on non-POSIX calls like setfs[ug]id for changing the user for each fop. The setfs[ug]id are also limited since they do not allow setting multiple group id as required for operation with NFS, which sends us all the group ids for a process issuing file system requests. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 400 (Support auxiliary gids in GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=400 --- libglusterfs/src/stack.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libglusterfs/src/stack.h') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index d4941a39f49..0af9ed35991 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -42,6 +42,7 @@ typedef struct _call_pool_t call_pool_t; #include "list.h" #include "common-utils.h" #include "globals.h" +#include "protocol.h" typedef int32_t (*ret_fn_t) (call_frame_t *frame, @@ -92,6 +93,8 @@ struct _call_stack_t { uid_t uid; gid_t gid; pid_t pid; + uint32_t ngrps; + uint32_t groups[GF_REQUEST_MAXGROUPS]; call_frame_t frames; int32_t op; @@ -253,6 +256,9 @@ copy_frame (call_frame_t *frame) newstack->uid = oldstack->uid; newstack->gid = oldstack->gid; newstack->pid = oldstack->pid; + newstack->ngrps = oldstack->ngrps; + memcpy (newstack->groups, oldstack->groups, + sizeof (uint32_t) * GF_REQUEST_MAXGROUPS); newstack->unique = oldstack->unique; newstack->frames.this = frame->this; -- cgit