1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

shadow_copy2: Use dirfsp for connectpath

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-09-15 03:41:55 +00:00 committed by Jeremy Allison
parent e1ca4e28d8
commit fbc17c41ae

View File

@ -2634,6 +2634,7 @@ static const char *shadow_copy2_connectpath(
char *stripped = NULL;
char *tmp = NULL;
const char *fname = smb_fname_in->base_name;
struct smb_filename *full = NULL;
struct smb_filename smb_fname = {0};
struct smb_filename *result_fname = NULL;
char *result = NULL;
@ -2653,7 +2654,13 @@ static const char *shadow_copy2_connectpath(
return priv->shadow_connectpath;
}
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, smb_fname_in,
full = full_path_from_dirfsp_atname(
talloc_tos(), dirfsp, smb_fname_in);
if (full == NULL) {
return NULL;
}
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, full,
&timestamp, &stripped)) {
goto done;
}