From 6aa371b39406aa93ff7a05737ef5f12f3493d992 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Feb 2021 13:55:12 -0800 Subject: [PATCH] Revert "VFS: shadow_copy2: Fixup shadow_copy2_mknodat() 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 2f74056a916aef9925cae76016378b993560e22b. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- source3/modules/vfs_shadow_copy2.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 174f246bdad..227ac148260 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1625,23 +1625,13 @@ static int shadow_copy2_mknodat(vfs_handle_struct *handle, mode_t mode, SMB_DEV_T dev) { - struct smb_filename *full_fname = NULL; time_t timestamp = 0; - full_fname = full_path_from_dirfsp_atname(talloc_tos(), - dirfsp, - smb_fname); - if (full_fname == NULL) { - return -1; - } - if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, - full_fname, + smb_fname, ×tamp, NULL)) { - TALLOC_FREE(full_fname); return -1; } - TALLOC_FREE(full_fname); if (timestamp != 0) { errno = EROFS; return -1; -- 2.47.3