summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
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
commita130656fc090777ad8daec154bdfe1a0a84eef92 (patch)
tree64abc27b3642f0daf43d64243fa596f1552896de /source3/rpc_parse
parent019bab27c8ac811885a836eaf234a3ba6aa8a361 (diff)
downloadsamba-a130656fc090777ad8daec154bdfe1a0a84eef92.tar.gz
samba-a130656fc090777ad8daec154bdfe1a0a84eef92.tar.bz2
samba-a130656fc090777ad8daec154bdfe1a0a84eef92.zip
rpc_parse/parse_rpc.c: Changes from TNG (thanks Luke) for NTLMSSP parsing.
smbd/reply.c: Fixed typo in debug. Jeremy. (This used to be commit c2aa6d66b3ca2a1a6dde8e9a1f6e761d98be517a)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 90200312bd..8d39b6e7c0 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/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;