summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2014-11-05 12:36:32 +0530
committerVenky Shankar <vshankar@redhat.com>2014-11-14 01:53:14 -0800
commit7fd6c51d7595e433f25859394d13d161d8884c9e (patch)
tree69d73f3b80d39f330b6ba5756cb6a7a8ca5e3113 /xlators
parent61f1a8fa322e4309989a9a5e022cad2bda55b751 (diff)
feature/gfid-access: Always send setattr down in overloaded setxattr.
Problem: File ownership is not being preserved for root in geo-rep mountbroker setup. Analysis and Cause: Entry creations for geo-rep is overloaded in ga_setxattr. It happens in two phase, entry creation followed by setattr to preserve ownership as in master. If uid and gid of file being synced is root, setattr was not being sent down. Since, the file creation happens with non-root user in mountborker geo-rep setup, if setattr is not done explicitly, file ownership is not preserved for root. Solution: Always pass setattr down in overloaded ga_setxattr. BUG: 1159213 Change-Id: I0a6ef16333190b069e2ae326721d2b983f6a1a44 Reviewed-on: http://review.gluster.org/9051 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9083 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index a5869f82187..512f9749348 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -440,9 +440,6 @@ ga_newentry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
goto done;
- if (!local->uid && !local->gid)
- goto done;
-
temp_stat.ia_uid = local->uid;
temp_stat.ia_gid = local->gid;