From 557b968b5a35e91262d65c40db79c81ce79f0d25 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Feb 2021 13:52:33 -0800 Subject: [PATCH] Revert "VFS: shadow_copy2: Fixup shadow_copy2_symlinkat() to correctly use the dirfsp path." MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This isn't needed as the existing code will refuse a new name with a non-zero twp in the target name. This reverts commit ec27c4c44d1e9035639e033689fa739518f17132. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- source3/modules/vfs_shadow_copy2.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index ae8afec11b1..174f246bdad 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1076,7 +1076,6 @@ static int shadow_copy2_symlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *new_smb_fname) { - struct smb_filename *full_fname = NULL; time_t timestamp_old = 0; time_t timestamp_new = 0; char *snappath_old = NULL; @@ -1091,25 +1090,15 @@ static int shadow_copy2_symlinkat(vfs_handle_struct *handle, NULL)) { return -1; } - - full_fname = full_path_from_dirfsp_atname(talloc_tos(), - dirfsp, - new_smb_fname); - if (full_fname == NULL) { - return -1; - } - if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), handle, - full_fname, + new_smb_fname, ×tamp_new, NULL, &snappath_new, NULL)) { - TALLOC_FREE(full_fname); return -1; } - TALLOC_FREE(full_fname); if ((timestamp_old != 0) || (timestamp_new != 0)) { errno = EROFS; return -1; -- 2.47.3