diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2009-12-03 05:15:09 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-03 02:59:28 -0800 |
commit | 5821d2cf591789760e790d4af0575d1b9754c08d (patch) | |
tree | bc1c51179718031180f3bdacf54fb66176aa42c1 /libglusterfs/src/stack.h | |
parent | 930f709881d85774baab1df57c2c03de93110bf7 (diff) |
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 <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 400 (Support auxiliary gids in GlusterFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=400
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r-- | libglusterfs/src/stack.h | 6 |
1 files changed, 6 insertions, 0 deletions
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; |