summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_net.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-02-14 23:04:03 +0000
committerJeremy Allison <jra@samba.org>2003-02-14 23:04:03 +0000
commit4cd6e31bd364270580f2907fbc5669bf29d09578 (patch)
tree4a364bf23c3275d74bb3b8490d9a21a14a1f59cd /source3/rpc_parse/parse_net.c
parent4f6c2ab8957c39119afecc33718d457fa59bd874 (diff)
downloadsamba-4cd6e31bd364270580f2907fbc5669bf29d09578.tar.gz
samba-4cd6e31bd364270580f2907fbc5669bf29d09578.tar.bz2
samba-4cd6e31bd364270580f2907fbc5669bf29d09578.zip
Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later. Jeremy. (This used to be commit 4c3ee228fcdb089eaeead95e79532a9cf6cb0de6)
Diffstat (limited to 'source3/rpc_parse/parse_net.c')
-rw-r--r--source3/rpc_parse/parse_net.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 853bca3b54..1e31836476 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1804,9 +1804,9 @@ static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info,
if (!smb_io_unihdr("hdr_unknown", &info->hdr_unknown, ps, depth))
return False;
- if (ps->data_offset + 40 > ps->buffer_size)
+ if (prs_offset(ps) + 40 > prs_data_size(ps))
return False;
- ps->data_offset += 40;
+ prs_set_offset(ps, prs_offset(ps) + 40);
if (!smb_io_unistr2("uni_dom_name", &info->uni_dom_name,
info->hdr_dom_name.buffer, ps, depth))
@@ -1843,9 +1843,9 @@ static BOOL net_io_sam_group_info(const char *desc, SAM_GROUP_INFO * info,
if (!smb_io_bufhdr2("hdr_sec_desc", &info->hdr_sec_desc, ps, depth))
return False;
- if (ps->data_offset + 48 > ps->buffer_size)
+ if (prs_offset(ps) + 48 > prs_data_size(ps))
return False;
- ps->data_offset += 48;
+ prs_set_offset(ps, prs_offset(ps) + 48);
if (!smb_io_unistr2("uni_grp_name", &info->uni_grp_name,
info->hdr_grp_name.buffer, ps, depth))
@@ -2124,13 +2124,13 @@ static BOOL net_io_sam_account_info(const char *desc, uint8 sess_key[16],
uint32 len = 0x44;
if (!prs_uint32("pwd_len", ps, depth, &len))
return False;
- old_offset = ps->data_offset;
+ old_offset = prs_offset(ps);
if (len == 0x44)
{
if (ps->io)
{
/* reading */
- if (!prs_hash1(ps, ps->data_offset, sess_key))
+ if (!prs_hash1(ps, prs_offset(ps), sess_key))
return False;
}
if (!net_io_sam_passwd_info("pass", &info->pass,
@@ -2144,9 +2144,9 @@ static BOOL net_io_sam_account_info(const char *desc, uint8 sess_key[16],
return False;
}
}
- if (old_offset + len > ps->buffer_size)
+ if (old_offset + len > prs_data_size(ps))
return False;
- ps->data_offset = old_offset + len;
+ prs_set_offset(ps, old_offset + len);
}
if (!smb_io_buffer4("buf_sec_desc", &info->buf_sec_desc,
info->hdr_sec_desc.buffer, ps, depth))
@@ -2181,9 +2181,9 @@ static BOOL net_io_sam_group_mem_info(const char *desc, SAM_GROUP_MEM_INFO * inf
if (!prs_uint32("num_members", ps, depth, &info->num_members))
return False;
- if (ps->data_offset + 16 > ps->buffer_size)
+ if (prs_offset(ps) + 16 > prs_data_size(ps))
return False;
- ps->data_offset += 16;
+ prs_set_offset(ps, prs_offset(ps) + 16);
if (info->ptr_rids != 0)
{
@@ -2263,9 +2263,9 @@ static BOOL net_io_sam_alias_info(const char *desc, SAM_ALIAS_INFO * info,
if (!smb_io_unihdr("hdr_als_desc", &info->hdr_als_desc, ps, depth))
return False;
- if (ps->data_offset + 40 > ps->buffer_size)
+ if (prs_offset(ps) + 40 > prs_data_size(ps))
return False;
- ps->data_offset += 40;
+ prs_set_offset(ps, prs_offset(ps) + 40);
if (!smb_io_unistr2("uni_als_name", &info->uni_als_name,
info->hdr_als_name.buffer, ps, depth))
@@ -2300,9 +2300,9 @@ static BOOL net_io_sam_alias_mem_info(const char *desc, SAM_ALIAS_MEM_INFO * inf
if (info->ptr_members != 0)
{
- if (ps->data_offset + 16 > ps->buffer_size)
+ if (prs_offset(ps) + 16 > prs_data_size(ps))
return False;
- ps->data_offset += 16;
+ prs_set_offset(ps, prs_offset(ps) + 16);
if (!prs_uint32("num_sids", ps, depth, &info->num_sids))
return False;