1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s3: smbd: Allow "smbd async dosmode = yes" to return valid DOS attributes again.

We already have a valid smb_fname->fsp, don't drop
it when returning from smbd_dirptr_lanman2_entry()
to allow it to be reused inside dos_mode_at_send().

Remove knownfail.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14758

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2021-07-14 15:00:13 -07:00 committed by Ralph Boehme
parent 8f8d0eaad6
commit d1ffcc8064
2 changed files with 15 additions and 12 deletions

View File

@ -1 +0,0 @@
^samba3.smbtorture_s3.plain.SMB2-LIST-DIR-ASYNC.smbtorture\(simpleserver\)

View File

@ -2551,23 +2551,27 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
}
if (_smb_fname != NULL) {
struct smb_filename *name = NULL;
/*
* smb_fname is already talloc'ed off ctx.
* We just need to make sure we don't return
* any stream_name, and replace base_name
* with fname in case base_name got mangled.
* This allows us to preserve any smb_fname->fsp
* for asynchronous handle lookups.
*/
TALLOC_FREE(smb_fname->stream_name);
TALLOC_FREE(smb_fname->base_name);
smb_fname->base_name = talloc_strdup(smb_fname, fname);
name = synthetic_smb_fname(ctx,
fname,
NULL,
&smb_fname->st,
smb_fname->twrp,
0);
if (name == NULL) {
if (smb_fname->base_name == NULL) {
TALLOC_FREE(smb_fname);
TALLOC_FREE(fname);
return NT_STATUS_NO_MEMORY;
}
*_smb_fname = name;
*_smb_fname = smb_fname;
} else {
TALLOC_FREE(smb_fname);
}
TALLOC_FREE(smb_fname);
TALLOC_FREE(fname);
if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {