smbd: Pass dirfsp instead of a parent filename to unix_mode
commitf60ca2e2f35666583f2e8cd11cb507406bb17393
authorVolker Lendecke <vl@samba.org>
Thu, 3 Mar 2022 10:52:12 +0000 (3 11:52 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 4 Mar 2022 17:43:42 +0000 (4 17:43 +0000)
tree947b10b62b081b279807078e6bcb843f5a1a9228
parentbe6cc4cc23f61d4c44796621daf726733f718a1a
smbd: Pass dirfsp instead of a parent filename to unix_mode

This converts a STAT (with potential symlink race problems) into an
FSTAT on the O_PATH fd we have for the directory

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dosmode.c
source3/smbd/open.c
source3/smbd/proto.h