From: Jeremy Allison Date: Mon, 13 Apr 2020 19:54:57 +0000 (-0700) Subject: s3: VFS: vfs_acl_common: Remove unused stat_fsp_or_smb_fname(). X-Git-Tag: ldb-2.2.0~619 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b45716487b9b46afbf660a2b3f4659f3cc53dda7;p=thirdparty%2Fsamba.git s3: VFS: vfs_acl_common: Remove unused stat_fsp_or_smb_fname(). Done separately to minimize the diff in the previous patch. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 5c6105701bc..79d78dbe814 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -593,50 +593,6 @@ fail: return status; } -#if 0 -static NTSTATUS stat_fsp_or_smb_fname(vfs_handle_struct *handle, - files_struct *fsp, - const struct smb_filename *smb_fname, - SMB_STRUCT_STAT *sbuf, - SMB_STRUCT_STAT **psbuf) -{ - NTSTATUS status; - int ret; - - if (fsp) { - status = vfs_stat_fsp(fsp); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - *psbuf = &fsp->fsp_name->st; - } else { - /* - * https://bugzilla.samba.org/show_bug.cgi?id=11249 - * - * We are currently guaranteed that 'name' here is a - * smb_fname->base_name, which *cannot* contain a stream name - * (':'). vfs_stat_smb_fname() splits a name into a base name + - * stream name, which when we get here we know we've already - * done. So we have to call the stat or lstat VFS calls - * directly here. Else, a base_name that contains a ':' (from a - * demangled name) will get split again. - * - * FIXME. - * This uglyness will go away once smb_fname is fully plumbed - * through the VFS. - */ - ret = vfs_stat_smb_basename(handle->conn, - smb_fname, - sbuf); - if (ret == -1) { - return map_nt_error_from_unix(errno); - } - } - - return NT_STATUS_OK; -} -#endif - /******************************************************************* Pull a DATA_BLOB from an xattr given an fsp. If the hash doesn't match, or doesn't exist - return the underlying