From a5911429560fad0585bdc5b9084ad77070abbf96 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Aug 2019 16:25:37 -0700 Subject: [PATCH] s3: VFS: vfs_shadow_copy2. Remove link_fn(). No longer used. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- source3/modules/vfs_shadow_copy2.c | 42 -------------------------------------- 1 file changed, 42 deletions(-) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 84fe49bdcb9..c8893fe88ed 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1226,47 +1226,6 @@ static int shadow_copy2_symlink(vfs_handle_struct *handle, return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname); } -static int shadow_copy2_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - time_t timestamp_old = 0; - time_t timestamp_new = 0; - char *snappath_old = NULL; - char *snappath_new = NULL; - - if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), - handle, - old_smb_fname->base_name, - ×tamp_old, - NULL, - &snappath_old, - NULL)) { - return -1; - } - if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), - handle, - new_smb_fname->base_name, - ×tamp_new, - NULL, - &snappath_new, - NULL)) { - return -1; - } - if ((timestamp_old != 0) || (timestamp_new != 0)) { - errno = EROFS; - return -1; - } - /* - * Don't allow links on already converted paths. - */ - if ((snappath_old != NULL) || (snappath_new != NULL)) { - errno = EROFS; - return -1; - } - return SMB_VFS_NEXT_LINK(handle, old_smb_fname, new_smb_fname); -} - static int shadow_copy2_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -3179,7 +3138,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = { .disk_free_fn = shadow_copy2_disk_free, .get_quota_fn = shadow_copy2_get_quota, .renameat_fn = shadow_copy2_renameat, - .link_fn = shadow_copy2_link, .linkat_fn = shadow_copy2_linkat, .symlink_fn = shadow_copy2_symlink, .stat_fn = shadow_copy2_stat, -- 2.11.4.GIT