From: Jeremy Allison Date: Fri, 16 Aug 2019 23:18:34 +0000 (-0700) Subject: s3: VFS: vfs_cap. Remove link_fn(). No longer used. X-Git-Tag: tevent-0.10.1~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45851ead18ab687218648237e8651887e4d809fa;p=thirdparty%2Fsamba.git s3: VFS: vfs_cap. Remove link_fn(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index b2c1c487852..05c5426919c 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -585,58 +585,6 @@ static int cap_readlink(vfs_handle_struct *handle, return ret; } -static int cap_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - char *capold = capencode(talloc_tos(), old_smb_fname->base_name); - char *capnew = capencode(talloc_tos(), new_smb_fname->base_name); - struct smb_filename *old_cap_smb_fname = NULL; - struct smb_filename *new_cap_smb_fname = NULL; - int saved_errno = 0; - int ret; - - if (!capold || !capnew) { - errno = ENOMEM; - return -1; - } - old_cap_smb_fname = synthetic_smb_fname(talloc_tos(), - capold, - NULL, - NULL, - old_smb_fname->flags); - if (old_cap_smb_fname == NULL) { - TALLOC_FREE(capold); - TALLOC_FREE(capnew); - errno = ENOMEM; - return -1; - } - new_cap_smb_fname = synthetic_smb_fname(talloc_tos(), - capnew, - NULL, - NULL, - new_smb_fname->flags); - if (new_cap_smb_fname == NULL) { - TALLOC_FREE(capold); - TALLOC_FREE(capnew); - TALLOC_FREE(old_cap_smb_fname); - errno = ENOMEM; - return -1; - } - ret = SMB_VFS_NEXT_LINK(handle, old_cap_smb_fname, new_cap_smb_fname); - if (ret == -1) { - saved_errno = errno; - } - TALLOC_FREE(capold); - TALLOC_FREE(capnew); - TALLOC_FREE(old_cap_smb_fname); - TALLOC_FREE(new_cap_smb_fname); - if (saved_errno != 0) { - errno = saved_errno; - } - return ret; -} - static int cap_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1086,7 +1034,6 @@ static struct vfs_fn_pointers vfs_cap_fns = { .ntimes_fn = cap_ntimes, .symlink_fn = cap_symlink, .readlink_fn = cap_readlink, - .link_fn = cap_link, .linkat_fn = cap_linkat, .mknod_fn = cap_mknod, .realpath_fn = cap_realpath,