libsmbclient libraries will always set the FLAGS2_DFS_PATHNAMES
bit when talking to a DFS share, but don't always canonicalize
the incoming pathname to a DFS one (see the code for cli_list()
that puts a non-DFS pathname into SMB2trans2_FindFirst for
example). This is a problem in our client libraries for both
SMB1 and SMB2+
As we still must cope with these older clients we must
keep the lenient parsing for DFS filenames sent over SMB1/2/3.
A future task - change the use of parse_dfs_path() in
dfs_filename_convert() to parse_dfs_path_strict() for SMB2
only and then try and get all our torture tests to pass.
This is not an easy fix (and would still break old clients
out there as well :-( ).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
char *reqpath = NULL;
NTSTATUS status;
+ /*
+ * We must use the non-strict version of parse_dfs_path for
+ * pathnames sent to the fileserver over SMB1/2/3.
+ * libsmbclient callers always set the FLAGS2_DFS_PATHNAMES
+ * but then don't send a DFS path in (for example) FindFirst
+ * or other calls. This is a problem with our client libraries
+ * for both SMB1 and SMB2+ and will remain so whilst broken
+ * versions of libsmbclient are being used.
+ */
+
status = parse_dfs_path(ctx,
conn,
dfs_path_in,