Normally these are never generated, but it can happen when the
signing check fails.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
* If we have a signing key, we should
* sign the response
*/
- if (smb2_signing_key_valid(signing_key)) {
+ if (smb2_signing_key_valid(signing_key) && opcode != SMB2_OP_CANCEL) {
req->do_signing = true;
}
* Now that we know the request was correctly signed
* we have to sign the response too.
*/
- req->do_signing = true;
+ if (opcode != SMB2_OP_CANCEL) {
+ req->do_signing = true;
+ }
if (!NT_STATUS_IS_OK(session_status)) {
return smbd_smb2_request_error(req, session_status);