s3: smbd: In filename_convert_dirfsp_nosymlink(), cope with an MS-DFS link as the...
authorJeremy Allison <jra@samba.org>
Mon, 8 Aug 2022 20:18:56 +0000 (13:18 -0700)
committerStefan Metzmacher <metze@samba.org>
Tue, 16 Aug 2022 18:27:13 +0000 (18:27 +0000)
commitd0a9046c80eb07529bf6e9696d8e8a557bb4e434
treeb6efa59a26efcc89d4047f7115ee759f085daf54
parent879b42bd6f4d1d64879735dc8e1b6438dd4c24b3
s3: smbd: In filename_convert_dirfsp_nosymlink(), cope with an MS-DFS link as the terminal component.

If the terminal component was an MSDFS link, openat_pathref_fsp_case_insensitive() will
return NT_STATUS_OBJECT_NAME_NOT_FOUND with a VALID_STAT of a symlink.

If this is the case, check if we actually found a terminal MS-DFS link
at the end of the pathname and return NT_STATUS_PATH_NOT_COVERED.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit d80bedc3c418b6839b1bde78ba8d3db06611be2a)
source3/smbd/filename.c