mirror of
https://github.com/samba-team/samba.git
synced 2025-02-14 01:57:53 +03:00
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 <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
ce6b3ba409
commit
e6f0269817
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user