summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-04-16 15:39:57 +0000
committerJeremy Allison <jra@samba.org>2003-04-16 15:39:57 +0000
commit09a50497d1360659eb8bd1b9f4be510680267bd2 (patch)
tree37bfc1657e9b5b14d5d7aa4d0aa1608217f2acec /source3/rpc_server
parentb5fd86aee1258b1964d460c4ad138c59d49e7691 (diff)
downloadsamba-09a50497d1360659eb8bd1b9f4be510680267bd2.tar.gz
samba-09a50497d1360659eb8bd1b9f4be510680267bd2.tar.bz2
samba-09a50497d1360659eb8bd1b9f4be510680267bd2.zip
Fixes to make SCHANNEL work in 3.0 against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC. Jeremy. (This used to be commit ff66d4097088409205b6bad5124a78ef9946010d)
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;
}