summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-04-16 15:54:00 +0000
committerJeremy Allison <jra@samba.org>2003-04-16 15:54:00 +0000
commit8f25fd3d7240a309182b32ac705634b4ff5cff2b (patch)
treebd57174391bc95b80c6b1093729507d8820e2883 /source3/rpc_server
parent84e2fbf17cf91486c22b39ed8b11f7ba148d6fab (diff)
downloadsamba-8f25fd3d7240a309182b32ac705634b4ff5cff2b.tar.gz
samba-8f25fd3d7240a309182b32ac705634b4ff5cff2b.tar.bz2
samba-8f25fd3d7240a309182b32ac705634b4ff5cff2b.zip
Fixes to make SCHANNEL work 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 ec82e8e9f4a6bf807a91ac265af39a516c7ab631)
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;
}