s3: smbd: Strip any leading '\\' characters if the SMB2 DFS flag is set.
commit33a5ca2f999509373d502bb3617df44c519e243a
authorJeremy Allison <jra@samba.org>
Wed, 4 Jan 2023 02:28:54 +0000 (3 18:28 -0800)
committerJule Anger <janger@samba.org>
Thu, 5 Jan 2023 10:01:54 +0000 (5 10:01 +0000)
tree43e739a83805e2a6d5b4e09fa0bff2fdf137dc20
parentbc05daafbc6ffb972faa58943514ecd9f879cdad
s3: smbd: Strip any leading '\\' characters if the SMB2 DFS flag is set.

MacOS clients send SMB2 DFS pathnames as \server\share\file\name.

Ensure smbd can cope with this by stipping any leading '\\'
characters from an SMB2 packet with the DFS flag set.

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

NB. The test for this is not back-ported to
4.17 as there are too many changes in the
test infrastructure and supporting client
libraries between 4.17 and master.

Back-ported from c9a6e242d15ee707a2e30f973fd37e80b3225aca.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Thu Jan  5 10:01:54 UTC 2023 on sn-devel-184
source3/smbd/smb2_create.c