From: Jeremy Allison Date: Fri, 3 Dec 2021 21:03:47 +0000 (-0800) Subject: s3: smbd: In unix_convert_step() remove all use of 'state->name_was_wildcard' X-Git-Tag: tdb-1.4.6~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f0269817ef121f55b212bcec8ed9fad40a6ffd;p=thirdparty%2Fsamba.git s3: smbd: In unix_convert_step() remove all use of 'state->name_was_wildcard' We know it is never true. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index cd51602a55c..a392d860356 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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,