summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-02-25 15:38:08 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-04 03:13:31 -0800
commitfa194179431b7e9aac68333c91a9c3254a15335d (patch)
treefc385c775f0902abfe47863269534b9b5108eff7 /xlators/cluster/dht/src/dht-common.c
parenta8f10e72f265e96f3785f278a3c4a3631b9f0392 (diff)
distribute: perform self-heal as root
prerserve original frame uid and gid and perform self-heal by changing uid/gid to root (0) temporarily. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 5dff5b877..e83d9847b 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -53,6 +53,8 @@ dht_lookup_selfheal_cbk (call_frame_t *frame, void *cookie,
local = frame->local;
ret = op_ret;
+ dht_frame_su_undo (frame);
+
if (ret == 0) {
layout = local->selfheal.layout;
ret = dht_layout_set (this, local->inode, layout);
@@ -191,6 +193,7 @@ unlock:
return 0;
selfheal:
+ dht_frame_su_do (frame);
ret = dht_selfheal_directory (frame, dht_lookup_selfheal_cbk,
&local->loc, layout);