SIVAL(hdr, SMB2_HDR_STATUS, NT_STATUS_V(NT_STATUS_PENDING));
SSVAL(hdr, SMB2_HDR_OPCODE, SVAL(outhdr, SMB2_HDR_OPCODE));
+ /*
+ * The STATUS_PENDING response has SMB2_HDR_FLAG_SIGNED
+ * clearedm, but echoes the signature field.
+ */
+ flags &= ~SMB2_HDR_FLAG_SIGNED;
SIVAL(hdr, SMB2_HDR_FLAGS, flags);
SIVAL(hdr, SMB2_HDR_NEXT_COMMAND, 0);
SBVAL(hdr, SMB2_HDR_MESSAGE_ID, message_id);
SMBD_SMB2_IN_HDR_IOV(req),
&state->vector[1+SMBD_SMB2_HDR_IOV_OFS]);
+ /*
+ * We add SMB2_HDR_FLAG_ASYNC after smb2_set_operation_credit()
+ * as it reacts on it
+ */
SIVAL(hdr, SMB2_HDR_FLAGS, flags | SMB2_HDR_FLAG_ASYNC);
if (DEBUGLVL(10)) {
nt_errstr(status));
return;
}
- } else if (req->do_signing) {
- struct smbXsrv_session *x = req->session;
- struct smb2_signing_key *signing_key =
- smbd_smb2_signing_key(x, xconn, NULL);
-
- status = smb2_signing_sign_pdu(signing_key,
- &state->vector[1+SMBD_SMB2_HDR_IOV_OFS],
- SMBD_SMB2_NUM_IOV_PER_REQ - 1);
- if (!NT_STATUS_IS_OK(status)) {
- smbd_server_connection_terminate(xconn,
- nt_errstr(status));
- return;
- }
}
state->queue_entry.mem_ctx = state;