summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-03-03 11:50:23 +0000
committergluster-ant <bugzilla-bot@gluster.org>2010-03-03 11:50:23 +0000
commit75d7ca2dbd45480132efa2478b8e2dd202cb7cd3 (patch)
treeb1be695e99169ac03dc422df9b3269b64357ad8d /libglusterfs/src/stack.h
parentde809f8295dd6b18f60e0ee1c1c06ee3d04aa561 (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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h
index cad7f79bec..cc059f0687 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)
{