s3: smbd: Add IS_VETO_PATH check to openat_pathref_dirfsp_nosymlink().
authorJeremy Allison <jra@samba.org>
Thu, 11 Aug 2022 16:55:56 +0000 (09:55 -0700)
committerStefan Metzmacher <metze@samba.org>
Tue, 16 Aug 2022 07:33:36 +0000 (07:33 +0000)
commit1c293060204d96bf94427f91eb20eb9decc29a41
tree09ff50482ee03468930294f8bcabdbb18ee52d39
parentc6933673222ea9ae2eb74d5586c9495269f51ea0
s3: smbd: Add IS_VETO_PATH check to openat_pathref_dirfsp_nosymlink().

Returns NT_STATUS_OBJECT_PATH_NOT_FOUND for directory component.
Note IS_VETO_PATH only looks at the last component, so we must
do it during the directory walk on each component.

Note, we also have to check after a call to get_real_filename_at()
as it may have demangled the client sent name into a filesystem
name that matches the "veto files" parameter.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15143

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/files.c