diff options
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 5f22a28082..7e9f8b4393 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -1615,139 +1615,6 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru return True; } -/******************************************************************* - Inits an LSA_Q_ENUM_PRIVS structure. -********************************************************************/ - -void init_q_enum_privs(LSA_Q_ENUM_PRIVS *in, POLICY_HND *hnd, uint32 enum_context, uint32 pref_max_length) -{ - DEBUG(5, ("init_q_enum_privs\n")); - - memcpy(&in->pol, hnd, sizeof(in->pol)); - - in->enum_context = enum_context; - in->pref_max_length = pref_max_length; -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ -bool lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *in, prs_struct *ps, int depth) -{ - if (in == NULL) - return False; - - prs_debug(ps, depth, desc, "lsa_io_q_enum_privs"); - depth++; - - if (!smb_io_pol_hnd("", &in->pol, ps, depth)) - return False; - - if(!prs_uint32("enum_context ", ps, depth, &in->enum_context)) - return False; - if(!prs_uint32("pref_max_length", ps, depth, &in->pref_max_length)) - return False; - - return True; -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ -static bool lsa_io_priv_entries(const char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth) -{ - uint32 i; - - if (entries == NULL) - return False; - - prs_debug(ps, depth, desc, "lsa_io_priv_entries"); - depth++; - - if(!prs_align(ps)) - return False; - - for (i = 0; i < count; i++) { - if (!smb_io_unihdr("", &entries[i].hdr_name, ps, depth)) - return False; - if(!prs_uint32("luid_low ", ps, depth, &entries[i].luid_low)) - return False; - if(!prs_uint32("luid_high", ps, depth, &entries[i].luid_high)) - return False; - } - - for (i = 0; i < count; i++) - if (!smb_io_unistr2("", &entries[i].name, entries[i].hdr_name.buffer, ps, depth)) - return False; - - return True; -} - -/******************************************************************* - Inits an LSA_R_ENUM_PRIVS structure. -********************************************************************/ - -void init_lsa_r_enum_privs(LSA_R_ENUM_PRIVS *out, uint32 enum_context, - uint32 count, LSA_PRIV_ENTRY *entries) -{ - DEBUG(5, ("init_lsa_r_enum_privs\n")); - - out->enum_context=enum_context; - out->count=count; - - if (entries!=NULL) { - out->ptr=1; - out->count1=count; - out->privs=entries; - } else { - out->ptr=0; - out->count1=0; - out->privs=NULL; - } -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ -bool lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *out, prs_struct *ps, int depth) -{ - if (out == NULL) - return False; - - prs_debug(ps, depth, desc, "lsa_io_r_enum_privs"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("enum_context", ps, depth, &out->enum_context)) - return False; - if(!prs_uint32("count", ps, depth, &out->count)) - return False; - if(!prs_uint32("ptr", ps, depth, &out->ptr)) - return False; - - if (out->ptr) { - if(!prs_uint32("count1", ps, depth, &out->count1)) - return False; - - if (UNMARSHALLING(ps) && out->count1) - if (!(out->privs = PRS_ALLOC_MEM(ps, LSA_PRIV_ENTRY, out->count1))) - return False; - - if (!lsa_io_priv_entries("", out->privs, out->count1, ps, depth)) - return False; - } - - if(!prs_align(ps)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, const char *name, uint16 lang_id, uint16 lang_id_sys) { memcpy(&trn->pol, hnd, sizeof(trn->pol)); |