summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 43fbb4edaa..df99c15777 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -279,8 +279,13 @@ BOOL create_next_pdu(pipes_struct *p)
prs_init(&rverf, 0, p->mem_ctx, MARSHALL);
prs_init(&rauth, 0, p->mem_ctx, MARSHALL);
- memset(sign, 0, sizeof(sign));
- sign[3] = 0x01;
+ if ((p->netsec_auth.seq_num & 1) == 0) {
+ DEBUG(0,("SCHANNEL ERROR: seq_num must be odd in server! (seq_num=%d)\n",
+ p->netsec_auth.seq_num));
+ }
+
+ RSIVAL(sign, 0, p->netsec_auth.seq_num);
+ SIVAL(sign, 4, 0);
init_rpc_auth_netsec_chk(&verf, netsec_sig, nullbytes, sign, nullbytes);
@@ -1340,6 +1345,9 @@ BOOL api_pipe_netsec_process(pipes_struct *p, prs_struct *rpc_in)
return False;
}
+ /* The sequence number gets incremented on both send and receive. */
+ p->netsec_auth.seq_num++;
+
return True;
}