diff options
author | Günther Deschner <gd@samba.org> | 2008-02-08 01:56:09 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-08 10:16:08 +0100 |
commit | b13277ed4e59c64f1c3c15109c85a8967c6260fe (patch) | |
tree | 72f618e2fd81f823896e8d7b6449967a843e052b | |
parent | 3783e6af8a8cd4b3cc1d43507704f17e6bb1a9a5 (diff) | |
download | samba-b13277ed4e59c64f1c3c15109c85a8967c6260fe.tar.gz samba-b13277ed4e59c64f1c3c15109c85a8967c6260fe.tar.bz2 samba-b13277ed4e59c64f1c3c15109c85a8967c6260fe.zip |
Remove unused marshalling for LSA_QUERY_INFO2.
Guenther
(This used to be commit 0fac016d9d0018c983576d5cc8c3e06f40360b73)
-rw-r--r-- | source3/include/rpc_lsa.h | 5 | ||||
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 96 | ||||
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 119 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 2 |
4 files changed, 1 insertions, 221 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h index 2825efc038..b86324d5e1 100644 --- a/source3/include/rpc_lsa.h +++ b/source3/include/rpc_lsa.h @@ -295,8 +295,6 @@ typedef struct lsa_info_ctr } LSA_INFO_CTR; -typedef LSA_INFO_CTR LSA_INFO_CTR2; - /* LSA_R_QUERY_INFO - response to LSA query info policy */ typedef struct lsa_r_query_info { @@ -306,9 +304,6 @@ typedef struct lsa_r_query_info } LSA_R_QUERY_INFO; -typedef LSA_Q_QUERY_INFO LSA_Q_QUERY_INFO2; -typedef LSA_R_QUERY_INFO LSA_R_QUERY_INFO2; - /*******************************************************/ typedef struct { diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index f3dad5af17..b28a1260a3 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -552,102 +552,6 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli, return result; } -/** Query info policy2 - * - * @param domain_name - returned remote server's domain name - * @param dns_name - returned remote server's dns domain name - * @param forest_name - returned remote server's forest name - * @param domain_guid - returned remote server's domain guid - * @param domain_sid - returned remote server's domain sid */ - -NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint16 info_class, - const char **domain_name, - const char **dns_name, - const char **forest_name, - struct GUID **domain_guid, - DOM_SID **domain_sid) -{ - prs_struct qbuf, rbuf; - LSA_Q_QUERY_INFO2 q; - LSA_R_QUERY_INFO2 r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - if (info_class != 12) - goto done; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - init_q_query2(&q, pol, info_class); - - CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYINFO2, - q, r, - qbuf, rbuf, - lsa_io_q_query_info2, - lsa_io_r_query_info2, - NT_STATUS_UNSUCCESSFUL); - - result = r.status; - - if (!NT_STATUS_IS_OK(result)) { - goto done; - } - - /* Return output parameters */ - - ZERO_STRUCTP(domain_guid); - - if (domain_name && r.ctr.info.id12.hdr_nb_dom_name.buffer) { - *domain_name = unistr2_to_ascii_talloc(mem_ctx, - &r.ctr.info.id12 - .uni_nb_dom_name); - if (!*domain_name) { - return NT_STATUS_NO_MEMORY; - } - } - if (dns_name && r.ctr.info.id12.hdr_dns_dom_name.buffer) { - *dns_name = unistr2_to_ascii_talloc(mem_ctx, - &r.ctr.info.id12 - .uni_dns_dom_name); - if (!*dns_name) { - return NT_STATUS_NO_MEMORY; - } - } - if (forest_name && r.ctr.info.id12.hdr_forest_name.buffer) { - *forest_name = unistr2_to_ascii_talloc(mem_ctx, - &r.ctr.info.id12 - .uni_forest_name); - if (!*forest_name) { - return NT_STATUS_NO_MEMORY; - } - } - - if (domain_guid) { - *domain_guid = TALLOC_P(mem_ctx, struct GUID); - if (!*domain_guid) { - return NT_STATUS_NO_MEMORY; - } - memcpy(*domain_guid, - &r.ctr.info.id12.dom_guid, - sizeof(struct GUID)); - } - - if (domain_sid && r.ctr.info.id12.ptr_dom_sid != 0) { - *domain_sid = TALLOC_P(mem_ctx, DOM_SID); - if (!*domain_sid) { - return NT_STATUS_NO_MEMORY; - } - sid_copy(*domain_sid, - &r.ctr.info.id12.dom_sid.sid); - } - - done: - - return result; -} - /** * Enumerate list of trusted domains * diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index daf4806392..3e7905847f 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -854,61 +854,6 @@ bool lsa_io_dom_query_12(const char *desc, DOM_QUERY_12 *info, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -static bool lsa_io_query_info_ctr2(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR2 *ctr) -{ - prs_debug(ps, depth, desc, "lsa_io_query_info_ctr2"); - depth++; - - if(!prs_uint16("info_class", ps, depth, &ctr->info_class)) - return False; - - switch (ctr->info_class) { - case 1: - if(!lsa_io_dom_query_1("", &ctr->info.id1, ps, depth)) - return False; - break; - case 2: - if(!lsa_io_dom_query_2("", &ctr->info.id2, ps, depth)) - return False; - break; - case 3: - if(!lsa_io_dom_query_3("", &ctr->info.id3, ps, depth)) - return False; - break; - case 5: - if(!lsa_io_dom_query_5("", &ctr->info.id5, ps, depth)) - return False; - break; - case 6: - if(!lsa_io_dom_query_6("", &ctr->info.id6, ps, depth)) - return False; - break; - case 10: - if(!lsa_io_dom_query_10("", &ctr->info.id10, ps, depth)) - return False; - break; - case 11: - if(!lsa_io_dom_query_11("", &ctr->info.id11, ps, depth)) - return False; - break; - case 12: - if(!lsa_io_dom_query_12("", &ctr->info.id12, ps, depth)) - return False; - break; - default: - DEBUG(0,("invalid info_class: %d\n", ctr->info_class)); - return False; - break; - } - - return True; -} - - -/******************************************************************* -reads or writes a structure. -********************************************************************/ - static bool lsa_io_query_info_ctr(const char *desc, prs_struct *ps, int depth, LSA_INFO_CTR *ctr) { prs_debug(ps, depth, desc, "lsa_io_query_info_ctr"); @@ -2924,70 +2869,6 @@ bool policy_handle_is_valid(const POLICY_HND *hnd) } /******************************************************************* - Inits an LSA_Q_QUERY_INFO2 structure. -********************************************************************/ - -void init_q_query2(LSA_Q_QUERY_INFO2 *in, POLICY_HND *hnd, uint16 info_class) -{ - DEBUG(5, ("init_q_query2\n")); - - memcpy(&in->pol, hnd, sizeof(in->pol)); - - in->info_class = info_class; -} - -/******************************************************************* - Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure. -********************************************************************/ - -bool lsa_io_q_query_info2(const char *desc, LSA_Q_QUERY_INFO2 *in, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_query_info2"); - 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_DNSDOMINFO structure. -********************************************************************/ - -bool lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *out, - prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_query_info2"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("dom_ptr", ps, depth, &out->dom_ptr)) - return False; - - if (out->dom_ptr) { - - if(!lsa_io_query_info_ctr2("", ps, depth, &out->ctr)) - return False; - } - - if(!prs_align(ps)) - return False; - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - -/******************************************************************* Inits an LSA_Q_ENUM_ACCT_RIGHTS structure. ********************************************************************/ void init_q_enum_acct_rights(LSA_Q_ENUM_ACCT_RIGHTS *in, diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 9f0d448364..61b9d19fa1 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1919,7 +1919,7 @@ NTSTATUS _lsa_QuerySecurity(pipes_struct *p, /*************************************************************************** ***************************************************************************/ -NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_INFO2 *r_u) + NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_INFO2 *r_u) { struct lsa_info *handle; const char *nb_name; |