s3: smbd: Add filename_convert_smb1_search_path() - deals with SMB1 search pathnames.
authorJeremy Allison <jra@samba.org>
Fri, 3 Dec 2021 18:35:09 +0000 (10:35 -0800)
committerRalph Boehme <slow@samba.org>
Sat, 11 Dec 2021 07:17:28 +0000 (07:17 +0000)
commit3ca822186435d917913f4163532ad5a0f306215f
treecb574ec41127cd1aa21c8d9e5a5de676845d6354
parentaddbf4cc3ba3a7a72c35118cf71bbed0e6d2c7f7
s3: smbd: Add filename_convert_smb1_search_path() - deals with SMB1 search pathnames.

SMB1search and trans2 findfirst are unique in that
they are the only passed in pathnames that can contain
a terminal wildcard component.

Deal with these two special cases with this new function
that strips off the terminal wildcard and returns as
the mask, and pass the non-wildcard parent directory
component through the standard filename_convert().

Uses new helper function strip_gmt_from_raw_dfs().

When SMB1search and trans2 findfirst have been
converted to use this function, we can strip all
wildcard handling out of filename_convert() as
we now know it will only ever be given valid
pathnames.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/filename.c
source3/smbd/proto.h