summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-10-17 12:08:26 +0200
committerVolker Lendecke <vl@samba.org>2014-06-27 06:49:10 +0200
commit87cad882308a00330bdcba67bf048cdb0f7ab9d9 (patch)
tree4395f9a011fdbd3180a830469d601fdb667e9c6c /source3/modules
parentb053d4b3f9fd26f1ea4d81d3a4461a6f74bf7686 (diff)
s3-shadow-copy2: Fix incorrect case submounts
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_shadow_copy2.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 029b155208..e7a8a9d137 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -472,8 +472,12 @@ static char *shadow_copy2_convert(TALLOC_CTX *mem_ctx,
/* never reached ... */
}
- path = talloc_asprintf(mem_ctx, "%s/%s", handle->conn->connectpath,
- name);
+ if (name[0] == 0) {
+ path = talloc_strdup(mem_ctx, handle->conn->connectpath);
+ } else {
+ path = talloc_asprintf(
+ mem_ctx, "%s/%s", handle->conn->connectpath, name);
+ }
if (path == NULL) {
errno = ENOMEM;
goto fail;
@@ -1677,14 +1681,6 @@ static int shadow_copy2_get_real_filename(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name,
mem_ctx, found_name);
}
- if (stripped[0] == '\0') {
- *found_name = talloc_strdup(mem_ctx, name);
- if (*found_name == NULL) {
- errno = ENOMEM;
- return -1;
- }
- return 0;
- }
conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp);
TALLOC_FREE(stripped);
if (conv == NULL) {