From b649007a532812ffb14a8fd7cbf204acb388e6d0 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 10 Nov 2023 10:01:46 +0100 Subject: [PATCH] smbd: remove now unneccessary wrapper vfs_fget_dos_attributes() Signed-off-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Nov 14 00:10:19 UTC 2023 on atb-devel-224 --- source3/include/proto.h | 3 --- source3/smbd/dosmode.c | 4 +++- source3/smbd/open.c | 5 ++++- source3/smbd/vfs.c | 13 ------------- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index bbb089a5908..06ad7fb508a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -82,9 +82,6 @@ NTSTATUS vfs_at_fspcwd(TALLOC_CTX *mem_ctx, struct connection_struct *conn, struct files_struct **_fsp); -NTSTATUS vfs_fget_dos_attributes(struct files_struct *fsp, - uint32_t *dosmode); - #include "source3/lib/interface.h" /* The following definitions come from lib/ldap_debug_handler.c */ diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 5b695a1d6e3..229a85a9171 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -715,7 +715,9 @@ uint32_t fdos_mode(struct files_struct *fsp) } /* Get the DOS attributes via the VFS if we can */ - status = vfs_fget_dos_attributes(fsp, &result); + status = SMB_VFS_FGET_DOS_ATTRIBUTES(fsp->conn, + metadata_fsp(fsp), + &result); if (!NT_STATUS_IS_OK(status)) { /* * Only fall back to using UNIX modes if we get NOT_IMPLEMENTED. diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 87a252a3d1b..cb1e2adbf1e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3906,7 +3906,10 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, */ uint32_t attr = 0; - status = vfs_fget_dos_attributes(smb_fname->fsp, &attr); + status = SMB_VFS_FGET_DOS_ATTRIBUTES( + conn, + metadata_fsp(smb_fname->fsp), + &attr); if (NT_STATUS_IS_OK(status)) { existing_dos_attributes = attr; } diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 3f984036ba3..3a1d18d6676 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1297,19 +1297,6 @@ NTSTATUS vfs_at_fspcwd(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -NTSTATUS vfs_fget_dos_attributes(struct files_struct *fsp, - uint32_t *dosmode) -{ - NTSTATUS status; - - /* - * Make sure to pass the base_fsp to the VFS - */ - status = SMB_VFS_FGET_DOS_ATTRIBUTES( - fsp->conn, metadata_fsp(fsp), dosmode); - return status; -} - static struct smb_vfs_deny_state *smb_vfs_deny_global; void smb_vfs_assert_allowed(void) -- 2.11.4.GIT