summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-05-26 09:28:39 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-27 02:00:34 -0700
commit419ff2e73983efc5b31e98795e99ab4fdff41e6e (patch)
tree5251745cb15ac167cbfd1fd67c3bad6518291be8
parente46c613364cd90f9c277db8b0733a99fc1d255de (diff)
resolver: set safer conditionals during path creation
when client would send just the path as part of a transaction, path reconstruction would create parent directory's path instead of actual path at the time of resolution. Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 935 (Directories change mode from 0755 to 0644 automatically) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=935
-rw-r--r--xlators/protocol/server/src/server-resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 00f1728c5..89c6cf0ef 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -110,7 +110,7 @@ resolve_loc_touchup (call_frame_t *frame)
loc = state->loc_now;
if (!loc->path) {
- if (loc->parent) {
+ if (loc->parent && resolve->bname) {
ret = inode_path (loc->parent, resolve->bname, &path);
} else if (loc->inode) {
ret = inode_path (loc->inode, NULL, &path);