]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In unix_convert_step() remove all use of 'state->name_was_wildcard'
authorJeremy Allison <jra@samba.org>
Fri, 3 Dec 2021 21:03:47 +0000 (13:03 -0800)
committerRalph Boehme <slow@samba.org>
Sat, 11 Dec 2021 07:17:29 +0000 (07:17 +0000)
We know it is never true.

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

index cd51602a55c7d3d1261720734ea20c033a4f5eed..a392d8603565a0e2faeeac16eeb18b03849ea20e 100644 (file)
@@ -855,25 +855,6 @@ static NTSTATUS unix_convert_step(struct uc_state *state)
                return NT_STATUS_OBJECT_PATH_NOT_FOUND;
        }
 
-       /* The name cannot have a wildcard if it's not
-          the last component. */
-
-       if (!state->posix_pathnames) {
-               state->name_has_wildcard = ms_has_wild(state->name);
-       }
-
-       /* Wildcards never valid within a pathname. */
-       if (state->name_has_wildcard && state->end != NULL) {
-               return NT_STATUS_OBJECT_NAME_INVALID;
-       }
-
-       /* Skip the stat call if it's a wildcard end. */
-       if (state->name_has_wildcard) {
-               DBG_DEBUG("Wildcard [%s]\n", state->name);
-               state->done = true;
-               return NT_STATUS_OK;
-       }
-
        status = unix_convert_step_stat(state);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -906,9 +887,9 @@ static NTSTATUS unix_convert_step(struct uc_state *state)
 
        /*
         * Cache the dirpath thus far. Don't cache a name with mangled
-        * or wildcard components as this can change the size.
+        * components as this can change the size.
         */
-       if(!state->component_was_mangled && !state->name_has_wildcard) {
+       if(!state->component_was_mangled) {
                stat_cache_add(state->orig_path,
                               state->dirpath,
                               state->smb_fname->twrp,