From 7bcf0b0262cea95238beb6c0c8d469d47a4bc825 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 16:57:55 +0100 Subject: Remove more unused LSA marshalling functions. Guenther (This used to be commit 95e0fb452bda4c81b26e3dec4953bbba37940467) --- source3/rpc_parse/parse_lsa.c | 406 ------------------------------------------ 1 file changed, 406 deletions(-) (limited to 'source3/rpc_parse') diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 98c4283347..1bddfba28e 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -2081,53 +2081,6 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru return True; } -/******************************************************************* - Reads or writes an LSA_Q_OPEN_SECRET structure. -********************************************************************/ - -bool lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_open_secret"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("", &in->handle, ps, depth)) - return False; - - if(!prs_unistr4 ("secretname", ps, depth, &in->secretname)) - return False; - if(!prs_align(ps)) - return False; - - if(!prs_uint32("access", ps, depth, &in->access)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes an LSA_R_OPEN_SECRET structure. -********************************************************************/ - -bool lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_open_secret"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("", &out->handle, ps, depth)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - /******************************************************************* Inits an LSA_Q_ENUM_PRIVS structure. ********************************************************************/ @@ -3314,239 +3267,6 @@ bool lsa_io_r_remove_acct_rights(const char *desc, LSA_R_REMOVE_ACCT_RIGHTS *out return True; } -/******************************************************************* - Inits an LSA_Q_OPEN_TRUSTED_DOMAIN structure. -********************************************************************/ - -void init_lsa_q_open_trusted_domain(LSA_Q_OPEN_TRUSTED_DOMAIN *q, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access) -{ - memcpy(&q->pol, hnd, sizeof(q->pol)); - - init_dom_sid2(&q->sid, sid); - q->access_mask = desired_access; -} - -/******************************************************************* -********************************************************************/ - -#if 0 /* jerry, I think this not correct - gd */ -bool lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain"); - depth++; - - if(!prs_align(ps)) - return False; - - if (!smb_io_pol_hnd("", &in->handle, ps, depth)) - return False; - - if(!prs_uint32("count", ps, depth, &in->count)) - return False; - - if(!smb_io_dom_sid("sid", &in->sid, ps, depth)) - return False; - - return True; -} -#endif - - -/******************************************************************* -********************************************************************/ - -bool lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *q_o, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("pol", &q_o->pol, ps, depth)) - return False; - - if(!smb_io_dom_sid2("sid", &q_o->sid, ps, depth)) - return False; - - if(!prs_uint32("access", ps, depth, &q_o->access_mask)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes an LSA_R_OPEN_TRUSTED_DOMAIN structure. -********************************************************************/ - -bool lsa_io_r_open_trusted_domain(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_open_trusted_domain"); - depth++; - - if(!prs_align(ps)) - return False; - - if (!smb_io_pol_hnd("handle", &out->handle, ps, depth)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_q_create_trusted_domain(const char *desc, LSA_Q_CREATE_TRUSTED_DOMAIN *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_create_trusted_domain"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("", &in->handle, ps, depth)) - return False; - - if(!prs_unistr4 ("secretname", ps, depth, &in->secretname)) - return False; - if(!prs_align(ps)) - return False; - - if(!prs_uint32("access", ps, depth, &in->access)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_r_create_trusted_domain(const char *desc, LSA_R_CREATE_TRUSTED_DOMAIN *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_create_trusted_domain"); - depth++; - - if(!prs_align(ps)) - return False; - - if (!smb_io_pol_hnd("", &out->handle, ps, depth)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_q_create_secret(const char *desc, LSA_Q_CREATE_SECRET *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_create_secret"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("", &in->handle, ps, depth)) - return False; - - if(!prs_unistr4 ("secretname", ps, depth, &in->secretname)) - return False; - if(!prs_align(ps)) - return False; - - if(!prs_uint32("access", ps, depth, &in->access)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_r_create_secret(const char *desc, LSA_R_CREATE_SECRET *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_create_secret"); - depth++; - - if(!prs_align(ps)) - return False; - - if (!smb_io_pol_hnd("", &out->handle, ps, depth)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - - - -/******************************************************************* -********************************************************************/ - -static bool lsa_io_data_blob( const char *desc, prs_struct *ps, int depth, LSA_DATA_BLOB *blob ) -{ - prs_debug(ps, depth, desc, "lsa_io_data_blob"); - depth++; - - if ( !prs_uint32("size", ps, depth, &blob->size) ) - return False; - if ( !prs_uint32("size", ps, depth, &blob->size) ) - return False; - - if ( !prs_io_unistr2_p(desc, ps, depth, &blob->data) ) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_q_set_secret(const char *desc, LSA_Q_SET_SECRET *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_set_secret"); - depth++; - - if ( !prs_align(ps) ) - return False; - - if ( !smb_io_pol_hnd("", &in->handle, ps, depth) ) - return False; - - if ( !prs_pointer( "old_value", ps, depth, (void*)&in->old_value, sizeof(LSA_DATA_BLOB), (PRS_POINTER_CAST)lsa_io_data_blob )) - return False; - - if( !prs_align(ps) ) - return False; - if ( !prs_pointer( "old_value", ps, depth, (void*)&in->old_value, sizeof(LSA_DATA_BLOB), (PRS_POINTER_CAST)lsa_io_data_blob )) - return False; - - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool lsa_io_r_set_secret(const char *desc, LSA_R_SET_SECRET *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_set_secret"); - depth++; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - /******************************************************************* ********************************************************************/ @@ -3577,129 +3297,3 @@ bool lsa_io_r_delete_object(const char *desc, LSA_R_DELETE_OBJECT *out, prs_stru return True; } - -/******************************************************************* - Inits an LSA_Q_QUERY_DOM_INFO_POLICY structure. -********************************************************************/ - -void init_q_query_dom_info(LSA_Q_QUERY_DOM_INFO_POLICY *in, POLICY_HND *hnd, uint16 info_class) -{ - DEBUG(5, ("init_q_query_dom_info\n")); - - memcpy(&in->pol, hnd, sizeof(in->pol)); - - in->info_class = info_class; -} - -/******************************************************************* - Reads or writes an LSA_Q_QUERY_DOM_INFO_POLICY structure. -********************************************************************/ - -bool lsa_io_q_query_dom_info(const char *desc, LSA_Q_QUERY_DOM_INFO_POLICY *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_query_dom_info"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("pol", &in->pol, ps, depth)) - return False; - - if(!prs_uint16("info_class", ps, depth, &in->info_class)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes an LSA_R_QUERY_DOM_INFO_POLICY structure. -********************************************************************/ - -static bool lsa_io_dominfo_query_3(const char *desc, LSA_DOM_INFO_POLICY_KERBEROS *krb_policy, - prs_struct *ps, int depth) -{ - if (!prs_align_uint64(ps)) - return False; - - if (!prs_align(ps)) - return False; - - if (!prs_uint32("enforce_restrictions", ps, depth, &krb_policy->enforce_restrictions)) - return False; - - if (!prs_align_uint64(ps)) - return False; - - if (!smb_io_nttime("service_tkt_lifetime", ps, depth, &krb_policy->service_tkt_lifetime)) - return False; - - if (!prs_align_uint64(ps)) - return False; - - if (!smb_io_nttime("user_tkt_lifetime", ps, depth, &krb_policy->user_tkt_lifetime)) - return False; - - if (!prs_align_uint64(ps)) - return False; - - if (!smb_io_nttime("user_tkt_renewaltime", ps, depth, &krb_policy->user_tkt_renewaltime)) - return False; - - if (!prs_align_uint64(ps)) - return False; - - if (!smb_io_nttime("clock_skew", ps, depth, &krb_policy->clock_skew)) - return False; - - if (!prs_align_uint64(ps)) - return False; - - if (!smb_io_nttime("unknown6", ps, depth, &krb_policy->unknown6)) - return False; - - return True; -} - -static bool lsa_io_dom_info_query(const char *desc, prs_struct *ps, int depth, LSA_DOM_INFO_UNION *info) -{ - prs_debug(ps, depth, desc, "lsa_io_dom_info_query"); - depth++; - - if(!prs_align_uint16(ps)) - return False; - - if(!prs_uint16("info_class", ps, depth, &info->info_class)) - return False; - - switch (info->info_class) { - case 3: - if (!lsa_io_dominfo_query_3("krb_policy", &info->krb_policy, ps, depth)) - return False; - break; - default: - DEBUG(0,("unsupported info-level: %d\n", info->info_class)); - return False; - break; - } - - return True; -} - - -bool lsa_io_r_query_dom_info(const char *desc, LSA_R_QUERY_DOM_INFO_POLICY *out, - prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_query_dom_info"); - depth++; - - if (!prs_pointer("dominfo", ps, depth, (void*)&out->info, - sizeof(LSA_DOM_INFO_UNION), - (PRS_POINTER_CAST)lsa_io_dom_info_query) ) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} -- cgit