diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-03-03 11:50:23 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-04 03:12:33 -0800 |
commit | 1582bc4e20d3f800c88d1c526cd32e92acf779dc (patch) | |
tree | ddfc27914ecc1a1071302670502708632d4a31ef /libglusterfs/src/stack.h | |
parent | efa1ce755bca123507997e6b5f3e27482fc0e3af (diff) |
core: Provide helper macro to set [ug]id in frame
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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index cad7f79bec2..cc059f06873 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) { |