s3: smbd: In filename_convert_dirfsp(), allow SMB1+POSIX to traverse non-terminal...
authorJeremy Allison <jra@samba.org>
Mon, 1 Aug 2022 21:40:54 +0000 (14:40 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 2 Aug 2022 19:49:31 +0000 (19:49 +0000)
commit6fd8f7fd18f6491c906f9281d316c87aab854f67
treeae19df565a423e85096ceed8a1d80f924e53ffca
parent766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0
s3: smbd: In filename_convert_dirfsp(), allow SMB1+POSIX to traverse non-terminal symlinks.

This is the behavior of filename_convert() and
we need to allow it for the legacy SMB1+POSIX libsmbclient
libraries already deployed out there.

When we add SMB2 POSIX we must disallow symlink
traversal over any symlinks, the client must
resolve symlinks locally.

Add a note to show this is where we need to add
an error for SMB2+POSIX names with UCF_POSIX_PATHNAMES
set.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/filename.c