summaryrefslogtreecommitdiffstats
path: root/source3/rpc_parse/parse_rpc.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-21 01:35:01 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-21 01:35:01 +0000
commit9307940876a6c226969e9169d55c0408cd7ab032 (patch)
treef52268ed32f852349028ee36aa2b8e5ebcb4bd01 /source3/rpc_parse/parse_rpc.c
parent053d6c605caebf5ed61b86f320da6a35f0c5257f (diff)
downloadsamba-9307940876a6c226969e9169d55c0408cd7ab032.tar.gz
samba-9307940876a6c226969e9169d55c0408cd7ab032.tar.xz
samba-9307940876a6c226969e9169d55c0408cd7ab032.zip
fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).
put unicode strings after SAMLOGON query regardless of whether it's an NT mailslot or a non-NT mailslot, after having observed this behaviour out of NT machines. (This used to be commit c101113ec20ed0ba633e78e4ee45596cdccaf1b5)
Diffstat (limited to 'source3/rpc_parse/parse_rpc.c')
-rw-r--r--source3/rpc_parse/parse_rpc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 44f95c7e0c..6b5da0ef56 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -559,6 +559,9 @@ void make_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg,
/*******************************************************************
reads or writes an RPC_AUTH_NTLMSSP_NEG structure.
+
+*** lkclXXXX HACK ALERT! ***
+
********************************************************************/
void smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth)
{
@@ -582,11 +585,11 @@ void smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_stru
old_offset = ps->offset;
- ps->offset = neg->hdr_myname .buffer + 0x1c;
+ ps->offset = neg->hdr_myname .buffer + 0x50; /* lkclXXXX HACK! */
prs_uint8s(True , "myname", ps, depth, (uint8*)neg->myname , MIN(neg->hdr_myname .str_str_len, sizeof(neg->myname )));
old_offset += neg->hdr_myname .str_str_len;
- ps->offset = neg->hdr_domain .buffer + 0x1c;
+ ps->offset = neg->hdr_domain .buffer + 0x50; /* lkclXXXX HACK! */
prs_uint8s(True , "domain", ps, depth, (uint8*)neg->domain , MIN(neg->hdr_domain .str_str_len, sizeof(neg->domain )));
old_offset += neg->hdr_domain .str_str_len;
@@ -803,24 +806,23 @@ void smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
/*******************************************************************
checks an RPC_AUTH_NTLMSSP_CHK structure.
********************************************************************/
-BOOL rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, uint32 crc32, uint32 *seq_num)
+BOOL rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, uint32 crc32, uint32 seq_num)
{
- if (chk == NULL || seq_num == NULL)
+ if (chk == NULL)
{
return False;
}
if (chk->crc32 != crc32 ||
chk->ver != NTLMSSP_SIGN_VERSION ||
- chk->seq_num != (*seq_num))
+ chk->seq_num != seq_num)
{
DEBUG(5,("verify failed - crc %x ver %x seq %d\n",
- crc32, NTLMSSP_SIGN_VERSION, (*seq_num)-1));
+ crc32, NTLMSSP_SIGN_VERSION, seq_num));
DEBUG(5,("verify expect - crc %x ver %x seq %d\n",
chk->crc32, chk->ver, chk->seq_num));
return False;
}
- (*seq_num)++;
return True;
}