summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.h
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-09-07 17:36:09 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-09 01:39:44 -0700
commit0a2de8337e7111d9cb860329d83b5aae3ecacd2f (patch)
tree46c105d6e93699a4837a9eedec4970d722df0efc /xlators/features/marker/src/marker.h
parentf655fa043fc65ecad1d633a52a40a4c20ff18c97 (diff)
features/marker-quota: Perform xattr related operations with root permissions in rename fop.
Change-Id: Id9ac1ecdd9753377c9eb24464f51dcbdc0cd2821 BUG: 3194 Reviewed-on: http://review.gluster.com/367 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
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 5502c4ea137..f5ed9df399e 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;