mirror of
https://github.com/samba-team/samba.git
synced 2024-12-21 09:34:19 +03:00
smbd: return correct error for compound related requests that went async
For a compound related request chain of eg CREATE+NOTIFY+GETINFO, the NOTIFY
will typically go async. When this is noted in smbd_smb2_request_pending_queue()
the pending async tevent_req is cancelled which means we return
NT_STATUS_CANCELLED to the client while Windows returns
NT_STATUS_INTERNAL_ERROR.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15697
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit a5635791cf
)
This commit is contained in:
parent
00fb1d0fe2
commit
9cdfb755b7
@ -216,8 +216,6 @@
|
||||
^samba3.smb2.getinfo.fsinfo # quotas don't work yet
|
||||
^samba3.smb2.setinfo.setinfo
|
||||
^samba3.smb2.session.*reauth5 # some special anonymous checks?
|
||||
^samba3.smb2.compound.interim2 # wrong return code (STATUS_CANCELLED)
|
||||
^samba3.smb2.compound.aio.interim2 # wrong return code (STATUS_CANCELLED)
|
||||
^samba3.smb2.lock.*replay_broken_windows # This tests the windows behaviour
|
||||
^samba3.smb2.lease.unlink # we currently do not downgrade RH lease to R after unlink
|
||||
^samba4.smb2.ioctl.compress_notsup.*\(ad_dc_ntvfs\)
|
||||
|
@ -4074,6 +4074,16 @@ NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
|
||||
}
|
||||
}
|
||||
|
||||
if (req->compound_related &&
|
||||
NT_STATUS_EQUAL(status, NT_STATUS_CANCELLED))
|
||||
{
|
||||
/*
|
||||
* A compound request went async but was cancelled as it was not
|
||||
* one of the allowed async compound requests.
|
||||
*/
|
||||
status = NT_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
body.data = outhdr + SMB2_HDR_BODY;
|
||||
body.length = 8;
|
||||
SSVAL(body.data, 0, 9);
|
||||
|
Loading…
Reference in New Issue
Block a user