diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-11 02:46:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:04 -0500 |
commit | e22d38bddef441eaaa5b0b0c5dbc92225e20f912 (patch) | |
tree | f018a880b91d9036b274f76d2d75d05956b48bac /source3/rpc_parse/parse_misc.c | |
parent | f0a6a004f3095289dc7da3e00cce2ddb279cee00 (diff) | |
download | samba-e22d38bddef441eaaa5b0b0c5dbc92225e20f912.tar.gz samba-e22d38bddef441eaaa5b0b0c5dbc92225e20f912.tar.xz samba-e22d38bddef441eaaa5b0b0c5dbc92225e20f912.zip |
r13455: Prepare to add lookupnames2.
Jeremy.
(This used to be commit 2274709587bd1f27bea2eacf633182f20cd07b1e)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index b5b224c0a40..bc1eda8d04d 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -1251,23 +1251,50 @@ BOOL smb_io_account_lockout_str(const char *desc, LOCKOUT_STRING *account_lockou } /******************************************************************* - Inits a DOM_RID2 structure. + Inits a DOM_RID structure. ********************************************************************/ -void init_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx) +void init_dom_rid(DOM_RID *prid, uint32 rid, uint8 type, uint32 idx) { - rid2->type = type; - rid2->rid = rid; - rid2->rid_idx = idx; + prid->type = type; + prid->rid = rid; + prid->rid_idx = idx; +} + +/******************************************************************* + Reads or writes a DOM_RID structure. +********************************************************************/ + +BOOL smb_io_dom_rid(const char *desc, DOM_RID *rid, prs_struct *ps, int depth) +{ + if (rid == NULL) + return False; + + prs_debug(ps, depth, desc, "smb_io_dom_rid"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint8("type ", ps, depth, &rid->type)) + return False; + if(!prs_align(ps)) + return False; + if(!prs_uint32("rid ", ps, depth, &rid->rid)) + return False; + if(!prs_uint32("rid_idx", ps, depth, &rid->rid_idx)) + return False; + + return True; } /******************************************************************* Reads or writes a DOM_RID2 structure. ********************************************************************/ -BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth) +BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid, prs_struct *ps, int depth) { - if (rid2 == NULL) + if (rid == NULL) return False; prs_debug(ps, depth, desc, "smb_io_dom_rid2"); @@ -1276,18 +1303,21 @@ BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth if(!prs_align(ps)) return False; - if(!prs_uint8("type ", ps, depth, &rid2->type)) + if(!prs_uint8("type ", ps, depth, &rid->type)) return False; if(!prs_align(ps)) return False; - if(!prs_uint32("rid ", ps, depth, &rid2->rid)) + if(!prs_uint32("rid ", ps, depth, &rid->rid)) return False; - if(!prs_uint32("rid_idx", ps, depth, &rid2->rid_idx)) + if(!prs_uint32("rid_idx", ps, depth, &rid->rid_idx)) + return False; + if(!prs_uint32("unknown", ps, depth, &rid->unknown)) return False; return True; } + /******************************************************************* creates a DOM_RID3 structure. ********************************************************************/ |