]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove use of smb_fname->original_lcomp from smb2 query directory.
authorJeremy Allison <jra@samba.org>
Wed, 25 Mar 2020 17:03:16 +0000 (10:03 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 30 Mar 2020 14:45:30 +0000 (14:45 +0000)
Use get_original_lcomp() call. Removes one use of smb_fname->original_lcomp.

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

index 79a46e005cfe6896fd100e98ae20db322b2f691a..131abfaee0e6c51920db6fa527b511de20111da2 100644 (file)
@@ -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) {