From d970556b682a5cb807b50ca83bb4ff1c36d2d423 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 30 Aug 2019 14:29:27 -0700 Subject: [PATCH] s3: VFS: vfs_cap. Remove symlink_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_cap.c | 42 --------------------------------------- 1 file changed, 42 deletions(-) diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index e2d075f961a..9999901056a 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -508,47 +508,6 @@ static int cap_ntimes(vfs_handle_struct *handle, return ret; } - -static int cap_symlink(vfs_handle_struct *handle, - const char *link_contents, - const struct smb_filename *new_smb_fname) -{ - char *capold = capencode(talloc_tos(), link_contents); - char *capnew = capencode(talloc_tos(), new_smb_fname->base_name); - struct smb_filename *new_cap_smb_fname = NULL; - int saved_errno = 0; - int ret; - - if (!capold || !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); - errno = ENOMEM; - return -1; - } - ret = SMB_VFS_NEXT_SYMLINK(handle, - capold, - new_cap_smb_fname); - if (ret == -1) { - saved_errno = errno; - } - TALLOC_FREE(capold); - TALLOC_FREE(capnew); - TALLOC_FREE(new_cap_smb_fname); - if (saved_errno != 0) { - errno = saved_errno; - } - return ret; -} - static int cap_symlinkat(vfs_handle_struct *handle, const char *link_contents, struct files_struct *dirfsp, @@ -1084,7 +1043,6 @@ static struct vfs_fn_pointers vfs_cap_fns = { .lchown_fn = cap_lchown, .chdir_fn = cap_chdir, .ntimes_fn = cap_ntimes, - .symlink_fn = cap_symlink, .symlinkat_fn = cap_symlinkat, .readlinkat_fn = cap_readlinkat, .linkat_fn = cap_linkat, -- 2.34.1