mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3-shadow-copy2: Fix incorrect case submounts
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
parent
b053d4b3f9
commit
87cad88230
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user