From: Jeremy Allison Date: Tue, 17 Sep 2019 01:00:31 +0000 (-0700) Subject: s3: VFS: vfs_cap: Remove unlink_fn. No longer used. X-Git-Tag: talloc-2.3.1~592 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4c4c688dd31ec3b27c1f6001fcc7baabb2d2f04;p=thirdparty%2Fsamba.git s3: VFS: vfs_cap: Remove unlink_fn. No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index ba7a7aa3598..9b7a855bab3 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -317,34 +317,6 @@ static int cap_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname) return ret; } -static int cap_unlink(vfs_handle_struct *handle, - const struct smb_filename *smb_fname) -{ - struct smb_filename *smb_fname_tmp = NULL; - char *cappath = NULL; - int ret; - - cappath = capencode(talloc_tos(), smb_fname->base_name); - if (!cappath) { - errno = ENOMEM; - return -1; - } - - /* Setup temporary smb_filename structs. */ - smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname); - if (smb_fname_tmp == NULL) { - errno = ENOMEM; - return -1; - } - - smb_fname_tmp->base_name = cappath; - - ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname_tmp); - - TALLOC_FREE(smb_fname_tmp); - return ret; -} - static int cap_unlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -1074,7 +1046,6 @@ static struct vfs_fn_pointers vfs_cap_fns = { .renameat_fn = cap_renameat, .stat_fn = cap_stat, .lstat_fn = cap_lstat, - .unlink_fn = cap_unlink, .unlinkat_fn = cap_unlinkat, .chmod_fn = cap_chmod, .chown_fn = cap_chown,