diff options
author | Günther Deschner <gd@samba.org> | 2004-12-20 12:52:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:41 -0500 |
commit | 111f62c00c31ac98d50c0a01e31cb1d44082be29 (patch) | |
tree | 8d21e9d0d53e81c2e50a57e1718a41cfe76d2e31 /source3/rpc_parse | |
parent | 992ad2848522e5219291d6b9b7a6be982c147a12 (diff) | |
download | samba-111f62c00c31ac98d50c0a01e31cb1d44082be29.tar.gz samba-111f62c00c31ac98d50c0a01e31cb1d44082be29.tar.bz2 samba-111f62c00c31ac98d50c0a01e31cb1d44082be29.zip |
r4287: Vampire SAM_DELTA_DOMAIN_INFO.
Based on samba4-idl. The decoding of account-lockout-string is somewhat
experimental though.
Guenther
(This used to be commit 721bf50d7446b8ce18bc1d45e17d4214d5a43d26)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 62 | ||||
-rw-r--r-- | source3/rpc_parse/parse_net.c | 46 |
2 files changed, 96 insertions, 12 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 17a8f624ae..0ebc16581b 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -1109,6 +1109,53 @@ BOOL init_unistr2_array(UNISTR2_ARRAY *array, return True; } +BOOL smb_io_lockout_string_hdr(const char *desc, HDR_LOCKOUT_STRING *hdr_account_lockout, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "smb_io_lockout_string_hdr"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint16("size", ps, depth, &hdr_account_lockout->size)) + return False; + if(!prs_uint16("length", ps, depth, &hdr_account_lockout->length)) + return False; + if(!prs_uint32("buffer", ps, depth, &hdr_account_lockout->buffer)) + return False; + + return True; +} + +BOOL smb_io_account_lockout_str(const char *desc, LOCKOUT_STRING *account_lockout, uint32 buffer, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "smb_io_account_lockout_string"); + depth++; + + if(!prs_uint32("array_size", ps, depth, &account_lockout->array_size)) + return False; + + if(!prs_uint32("offset", ps, depth, &account_lockout->offset)) + return False; + if(!prs_uint32("length", ps, depth, &account_lockout->length)) + return False; + + if (!prs_uint64("lockout_duration", ps, depth, &account_lockout->lockout_duration)) + return False; + if (!prs_uint64("reset_count", ps, depth, &account_lockout->reset_count)) + return False; + if (!prs_uint32("bad_attempt_lockout", ps, depth, &account_lockout->bad_attempt_lockout)) + return False; + if (!prs_uint32("dummy", ps, depth, &account_lockout->dummy)) + return False; +#if 0 + if(!prs_uint16s (False, "bindata", ps, depth, &account_lockout->bindata, length)) + return False; +#endif + + return True; +} + /******************************************************************* Reads or writes a UNISTR2_ARRAY structure. ********************************************************************/ @@ -1695,6 +1742,21 @@ BOOL smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth) } /******************************************************************* +reads or writes a BUFHDR4 structure. +********************************************************************/ +BOOL smb_io_bufhdr4(const char *desc, BUFHDR4 *hdr, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "smb_io_bufhdr4"); + depth++; + + prs_align(ps); + prs_uint32("size", ps, depth, &(hdr->size)); + prs_uint32("buffer", ps, depth, &(hdr->buffer)); + + return True; +} + +/******************************************************************* reads or writes a BUFFER4 structure. ********************************************************************/ BOOL smb_io_buffer4(const char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth) diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index 7e5eec3e6d..5f1d4b622e 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -1937,15 +1937,26 @@ static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info, return False; if (!smb_io_time("creation_time", &info->creation_time, ps, depth)) return False; - - if (!smb_io_bufhdr2("hdr_sec_desc", &info->hdr_sec_desc, ps, depth)) - return False; - if (!smb_io_unihdr("hdr_unknown", &info->hdr_unknown, ps, depth)) - return False; - - if (ps->data_offset + 40 > ps->buffer_size) - return False; - ps->data_offset += 40; + if (!prs_uint32("security_information", ps, depth, &info->security_information)) + return False; + if (!smb_io_bufhdr4("hdr_sec_desc", &info->hdr_sec_desc, ps, depth)) + return False; + if (!smb_io_lockout_string_hdr("hdr_account_lockout_string", &info->hdr_account_lockout, ps, depth)) + return False; + if (!smb_io_unihdr("hdr_unknown2", &info->hdr_unknown2, ps, depth)) + return False; + if (!smb_io_unihdr("hdr_unknown3", &info->hdr_unknown3, ps, depth)) + return False; + if (!smb_io_unihdr("hdr_unknown4", &info->hdr_unknown4, ps, depth)) + return False; + if (!prs_uint32("logon_chgpass", ps, depth, &info->logon_chgpass)) + return False; + if (!prs_uint32("unknown6", ps, depth, &info->unknown6)) + return False; + if (!prs_uint32("unknown7", ps, depth, &info->unknown7)) + return False; + if (!prs_uint32("unknown8", ps, depth, &info->unknown8)) + return False; if (!smb_io_unistr2("uni_dom_name", &info->uni_dom_name, info->hdr_dom_name.buffer, ps, depth)) @@ -1957,9 +1968,20 @@ static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info, if (!smb_io_buffer4("buf_sec_desc", &info->buf_sec_desc, info->hdr_sec_desc.buffer, ps, depth)) return False; - if (!smb_io_unistr2("buf_unknown", &info->buf_unknown, - info->hdr_unknown.buffer, ps, depth)) - return False; + + if (!smb_io_account_lockout_str("account_lockout", &info->account_lockout, + info->hdr_account_lockout.buffer, ps, depth)) + return False; + + if (!smb_io_unistr2("buf_unknown2", &info->buf_unknown2, + info->hdr_unknown2.buffer, ps, depth)) + return False; + if (!smb_io_unistr2("buf_unknown3", &info->buf_unknown3, + info->hdr_unknown3.buffer, ps, depth)) + return False; + if (!smb_io_unistr2("buf_unknown4", &info->buf_unknown4, + info->hdr_unknown4.buffer, ps, depth)) + return False; return True; } |