From: Jeremy Allison Date: Fri, 30 Aug 2019 21:34:37 +0000 (-0700) Subject: s3: VFS: vfs_shadow_copy2. Remove symlink_fn(). No longer used. X-Git-Tag: tevent-0.10.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a521377e200d2813eab661be22f520e1cf7cb12b;p=thirdparty%2Fsamba.git s3: VFS: vfs_shadow_copy2. Remove symlink_fn(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 31f2567f114..c3fcc1f92eb 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1184,48 +1184,6 @@ static int shadow_copy2_renameat(vfs_handle_struct *handle, smb_fname_dst); } - -static int shadow_copy2_symlink(vfs_handle_struct *handle, - const char *link_contents, - 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, - link_contents, - ×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 symlinks on already converted paths. - */ - if ((snappath_old != NULL) || (snappath_new != NULL)) { - errno = EROFS; - return -1; - } - return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname); -} - static int shadow_copy2_symlinkat(vfs_handle_struct *handle, const char *link_contents, struct files_struct *dirfsp, @@ -3198,7 +3156,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = { .get_quota_fn = shadow_copy2_get_quota, .renameat_fn = shadow_copy2_renameat, .linkat_fn = shadow_copy2_linkat, - .symlink_fn = shadow_copy2_symlink, .symlinkat_fn = shadow_copy2_symlinkat, .stat_fn = shadow_copy2_stat, .lstat_fn = shadow_copy2_lstat,