From: Jeremy Allison Date: Wed, 25 Mar 2020 17:03:16 +0000 (-0700) Subject: s3: smbd: Remove use of smb_fname->original_lcomp from smb2 query directory. X-Git-Tag: ldb-2.2.0~1157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d785ae5170ef8f4a072afa01a8965c4d0ff19fc;p=thirdparty%2Fsamba.git s3: smbd: Remove use of smb_fname->original_lcomp from smb2 query directory. Use get_original_lcomp() call. Removes one use of smb_fname->original_lcomp. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 79a46e005cf..131abfaee0e 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -436,7 +436,20 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - state->in_file_name = smb_fname->original_lcomp; + /* + * We still need to do the case processing + * to save off the client-supplied last component. + * At least we know there's no @GMT normalization + * or MS-DFS paths to do in a directory mask. + */ + state->in_file_name = get_original_lcomp(state, + conn, + state->in_file_name, + 0); + if (state->in_file_name == NULL) { + tevent_req_oom(req); + return tevent_req_post(req, ev); + } } if (fsp->dptr == NULL) {