From: Jeremy Allison Date: Mon, 27 Mar 2023 19:16:32 +0000 (-0700) Subject: s3: smbd: Add assertion to filename_convert_dirfsp_nosymlink() that shows SMB2 is... X-Git-Tag: talloc-2.4.1~1223 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31f5c714c609cd91fb87058673c02e24f0dea42e;p=thirdparty%2Fsamba.git s3: smbd: Add assertion to filename_convert_dirfsp_nosymlink() that shows SMB2 is *never* dealing with a DFS path here. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 78f552de9b2..302db9d9fe5 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1029,6 +1029,15 @@ static NTSTATUS filename_convert_dirfsp_nosymlink( * We've been given a raw DFS pathname. */ char *pathname = NULL; + + /* + * This *MUST* be an SMB1 connection. + * We now strip all DFS paths from SMB2 + * before calling filename convert functions. + * + */ + SMB_ASSERT(!conn->sconn->using_smb2); + DBG_DEBUG("Before dfs_filename_convert name_in: %s\n", name_in); status = dfs_filename_convert(mem_ctx,