summaryrefslogtreecommitdiff
path: root/source/rpc_parse/parse_rpc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-04-13 18:38:00 +0000
committerJeremy Allison <jra@samba.org>2000-04-13 18:38:00 +0000
commitc2aa6d66b3ca2a1a6dde8e9a1f6e761d98be517a (patch)
tree15a938d617c10c1afeedac79466877137cf718fe /source/rpc_parse/parse_rpc.c
parent0216d81f061ee599a798fdbf25625fbbbd88ef08 (diff)
downloadsamba-c2aa6d66b3ca2a1a6dde8e9a1f6e761d98be517a.tar.gz
rpc_parse/parse_rpc.c: Changes from TNG (thanks Luke) for NTLMSSP parsing.
smbd/reply.c: Fixed typo in debug. Jeremy.
Diffstat (limited to 'source/rpc_parse/parse_rpc.c')
-rw-r--r--source/rpc_parse/parse_rpc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/rpc_parse/parse_rpc.c b/source/rpc_parse/parse_rpc.c
index 90200312bd3..8d39b6e7c05 100644
--- a/source/rpc_parse/parse_rpc.c
+++ b/source/rpc_parse/parse_rpc.c
@@ -692,6 +692,7 @@ void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg,
BOOL smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth)
{
+ uint32 start_offset = prs_offset(ps);
if (neg == NULL)
return False;
@@ -718,8 +719,7 @@ BOOL smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_stru
old_offset = prs_offset(ps);
- /* lkclXXXX HACK! */
- if(!prs_set_offset(ps, neg->hdr_myname.buffer + 0x50))
+ if(!prs_set_offset(ps, neg->hdr_myname.buffer + start_offset - 12))
return False;
if(!prs_uint8s(True, "myname", ps, depth, (uint8*)neg->myname,
@@ -728,8 +728,7 @@ BOOL smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_stru
old_offset += neg->hdr_myname.str_str_len;
- /* lkclXXXX HACK! */
- if(!prs_set_offset(ps, neg->hdr_domain.buffer + 0x50))
+ if(!prs_set_offset(ps, neg->hdr_domain.buffer + start_offset - 12))
return False;
if(!prs_uint8s(True, "domain", ps, depth, (uint8*)neg->domain,
@@ -915,7 +914,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
old_offset = prs_offset(ps);
- if(!prs_set_offset(ps, rsp->hdr_domain.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_domain.buffer + 0xc))
return False;
if(!prs_uint8s(True , "domain ", ps, depth, (uint8*)rsp->domain,
@@ -924,7 +923,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
old_offset += rsp->hdr_domain.str_str_len;
- if(!prs_set_offset(ps, rsp->hdr_usr.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_usr.buffer + 0xc))
return False;
if(!prs_uint8s(True , "user ", ps, depth, (uint8*)rsp->user,
@@ -933,7 +932,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
old_offset += rsp->hdr_usr.str_str_len;
- if(!prs_set_offset(ps, rsp->hdr_wks.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_wks.buffer + 0xc))
return False;
if(!prs_uint8s(True, "wks ", ps, depth, (uint8*)rsp->wks,
@@ -942,7 +941,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
old_offset += rsp->hdr_wks.str_str_len;
- if(!prs_set_offset(ps, rsp->hdr_lm_resp.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_lm_resp.buffer + 0xc))
return False;
if(!prs_uint8s(False, "lm_resp ", ps, depth, (uint8*)rsp->lm_resp,
@@ -951,7 +950,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
old_offset += rsp->hdr_lm_resp.str_str_len;
- if(!prs_set_offset(ps, rsp->hdr_nt_resp.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_nt_resp.buffer + 0xc))
return False;
if(!prs_uint8s(False, "nt_resp ", ps, depth, (uint8*)rsp->nt_resp,
@@ -962,7 +961,7 @@ BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_st
if (rsp->hdr_sess_key.str_str_len != 0) {
- if(!prs_set_offset(ps, rsp->hdr_sess_key.buffer + 0x1c))
+ if(!prs_set_offset(ps, rsp->hdr_sess_key.buffer + 0x10))
return False;
old_offset += rsp->hdr_sess_key.str_str_len;