From: Ralph Boehme Date: Tue, 17 Nov 2020 06:59:13 +0000 (+0100) Subject: smbd: adjust allocation size check across handles in smbd_do_qfilepathinfo() X-Git-Tag: samba-4.14.0rc1~315 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=435c0f88286cffafffd77469b29adcd06abea4e4;p=thirdparty%2Fsamba.git smbd: adjust allocation size check across handles in smbd_do_qfilepathinfo() Check all open files if either we don't have an fsp or if the fsp is not a full FSA fsp, ie not one which was created by SMB_VFS_CREATE_FILE() but by openat_pathref_fsp(). Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a188641e347..55eb015b5ce 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -5304,7 +5304,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn, fsp, psbuf); - if (!fsp) { + if (fsp == NULL || !fsp->fsp_flags.is_fsa) { /* Do we have this path open ? */ files_struct *fsp1; struct file_id fileid = vfs_file_id_from_sbuf(conn, psbuf);