From 1582bc4e20d3f800c88d1c526cd32e92acf779dc Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 3 Mar 2010 11:50:23 +0000 Subject: core: Provide helper macro to set [ug]id in frame 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 | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index cad7f79be..cc059f068 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -104,6 +104,15 @@ struct _call_stack_t { }; +#define frame_set_uid_gid(frm, u, g) \ + do { \ + if (frm) { \ + (frm)->root->uid = u; \ + (frm)->root->gid = g; \ + (frm)->root->ngrps = 0; \ + } \ + } while (0); \ + static inline void FRAME_DESTROY (call_frame_t *frame) { -- cgit