*/
#include "includes.h"
+#include "smb_server/smb_server.h"
+
/*
sign an outgoing packet
srv_setup_signing(smb_conn, session_key, response);
smb_conn->signing.next_seq_num = 2;
if (smb_conn->signing.mandatory_signing) {
- DEBUG(5, ("Configured for mandetory signing, 'good packet seen' forced on\n"));
- /* if this is mandetory, then
+ DEBUG(5, ("Configured for mandatory signing, 'good packet seen' forced on\n"));
+ /* if this is mandatory, then
* pretend we have seen a
* valid packet, so we don't
* turn it off */
{
req->seq_num = req->smb_conn->signing.next_seq_num;
- /* TODO: we need to handle one-way requests like NTcancel, which
- only increment the sequence number by 1 */
if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
req->smb_conn->signing.next_seq_num += 2;
}
}
+/*
+ called for requests that do not produce a reply of their own
+*/
+void req_signing_no_reply(struct smbsrv_request *req)
+{
+ if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
+ req->smb_conn->signing.next_seq_num--;
+ }
+}
+
/***********************************************************
SMB signing - Simple implementation - check a MAC sent by client
************************************************************/