From: Ralph Boehme Date: Fri, 29 Jul 2022 12:55:08 +0000 (+0200) Subject: smbd: use metadata_fsp() with SMB_VFS_FGET_DOS_ATTRIBUTES() X-Git-Tag: talloc-2.4.0~1484 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03b9ce84736d536ab2dd8a5ce1a2656e6a90c8c8;p=thirdparty%2Fsamba.git smbd: use metadata_fsp() with SMB_VFS_FGET_DOS_ATTRIBUTES() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126 MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index b8ceb8e148f..5fc130ac669 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -727,7 +727,8 @@ uint32_t fdos_mode(struct files_struct *fsp) } /* Get the DOS attributes via the VFS if we can */ - status = SMB_VFS_FGET_DOS_ATTRIBUTES(fsp->conn, 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 093f9b17257..42e0955f937 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3615,7 +3615,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, */ uint32_t attr = 0; - status = SMB_VFS_FGET_DOS_ATTRIBUTES(conn, 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; }