From: Ralph Boehme Date: Mon, 13 Nov 2023 09:35:30 +0000 (+0100) Subject: smbd: check is POSIX is enabled on the fsp in fsinfo_unix_valid_level() X-Git-Tag: talloc-2.4.2~535 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55d98b29eb294542cc4947573f233e0d5e6966cb;p=thirdparty%2Fsamba.git smbd: check is POSIX is enabled on the fsp in fsinfo_unix_valid_level() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 84726c10eaa..5ed2d9ffcac 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -1952,7 +1952,9 @@ static bool fsinfo_unix_valid_level(connection_struct *conn, uint16_t info_level) { if (conn->sconn->using_smb2 && - info_level == SMB2_FS_POSIX_INFORMATION_INTERNAL) { + fsp->posix_flags == FSP_POSIX_FLAGS_OPEN && + info_level == SMB2_FS_POSIX_INFORMATION_INTERNAL) + { return true; } #if defined(SMB1SERVER)