summaryrefslogtreecommitdiffstats
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-05-13 20:32:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:34 -0500
commit41db2016adc464691ea2c3497aedca55fcf004ed (patch)
tree234a0400241741534059d06798af251e13a689fd /source3/rpc_parse
parent8fd6298df0c219c522e2262e16eaf97c47f3799f (diff)
downloadsamba-41db2016adc464691ea2c3497aedca55fcf004ed.tar.gz
samba-41db2016adc464691ea2c3497aedca55fcf004ed.tar.xz
samba-41db2016adc464691ea2c3497aedca55fcf004ed.zip
r704: BUG 1315: fix for schannel client connections to server's that don't support 128 bit encryption
(This used to be commit 316ba5ad89ddfa445d44d28141c5901fc64aec90)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 69262b6d0cb..f4ffcba1bdf 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -1189,7 +1189,8 @@ BOOL smb_io_rpc_auth_netsec_neg(const char *desc, RPC_AUTH_NETSEC_NEG *neg,
/*******************************************************************
reads or writes an RPC_AUTH_NETSEC_CHK structure.
********************************************************************/
-BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk,
+BOOL smb_io_rpc_auth_netsec_chk(const char *desc, int auth_len,
+ RPC_AUTH_NETSEC_CHK * chk,
prs_struct *ps, int depth)
{
if (chk == NULL)
@@ -1198,10 +1199,19 @@ BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk,
prs_debug(ps, depth, desc, "smb_io_rpc_auth_netsec_chk");
depth++;
- prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig));
- prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num));
- prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest));
- prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder));
+ if ( !prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)) )
+ return False;
+
+ if ( !prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)) )
+ return False;
+
+ if ( !prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)) )
+ return False;
+
+ if ( auth_len == RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN ) {
+ if ( !prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)) )
+ return False;
+ }
return True;
}