summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.c
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-07-25 14:59:25 +0530
committerAnand Avati <avati@gluster.com>2011-07-29 01:18:20 -0700
commit426c6e6b24748c0826cc97e8f736bc87a1c8df04 (patch)
tree5839dec2474b737e36a2da561f53676ecacf8006 /xlators/features/marker/src/marker.c
parent508cd242ea3495f987cf9f34c627482bfc68949b (diff)
features/marker-quota: Perform removexattr with frame uid and gid set to root.
Change-Id: Iabd8ff835c76d828e4af50ce4941d2ff86797eee BUG: 3194 Reviewed-on: http://review.gluster.com/99 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <raghavendra@gluster.com>
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r--xlators/features/marker/src/marker.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index b4cf5080071..3edbd7da058 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1018,6 +1018,9 @@ marker_rename_release_oldp_lock (call_frame_t *frame, void *cookie,
local->err = op_errno;
}
+ //Reset frame uid and gid if reset.
+ MARKER_SET_UID_GID (frame->root, local);
+
lock.l_type = F_UNLCK;
lock.l_whence = SEEK_SET;
lock.l_start = 0;
@@ -1085,6 +1088,13 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto quota_err;
}
+ /* Removexattr requires uid and gid to be 0,
+ * reset them in the callback.
+ */
+ MARKER_SET_UID_GID (local, frame->root);
+ frame->root->uid = 0;
+ frame->root->gid = 0;
+
STACK_WIND (frame, marker_rename_release_oldp_lock,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->removexattr, &local->loc,