summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/src/marker.h')
-rw-r--r--xlators/features/marker/src/marker.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h
index c8c775024..1fc57057c 100644
--- a/xlators/features/marker/src/marker.h
+++ b/xlators/features/marker/src/marker.h
@@ -64,7 +64,7 @@ enum {
} \
} while (0)
-#define MARKER_SET_UID_GID(dest, src) \
+#define _MARKER_SET_UID_GID(dest, src) \
do { \
if (src->uid != -1 && \
src->gid != -1) { \
@@ -73,6 +73,20 @@ enum {
} \
} while (0)
+#define MARKER_SET_UID_GID(frame, dest, src) \
+ do { \
+ _MARKER_SET_UID_GID (dest, src); \
+ frame->root->uid = 0; \
+ frame->root->gid = 0; \
+ frame->cookie = (void *) _GF_UID_GID_CHANGED; \
+ } while (0)
+
+#define MARKER_RESET_UID_GID(frame, dest, src) \
+ do { \
+ _MARKER_SET_UID_GID (dest, src); \
+ frame->cookie = NULL; \
+ } while (0)
+
struct marker_local{
uint32_t timebuf[2];
pid_t pid;