diff options
author | Tim Potter <tpot@samba.org> | 2000-12-08 03:57:50 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-12-08 03:57:50 +0000 |
commit | e15921110a6e88b26ed978e5f3697404f673acf7 (patch) | |
tree | 4fe05cf23e9d852e6fff5b3b979292facebe1dbe /source3 | |
parent | 693f23a5cc6a5716c4609a15acc05aaf141551ab (diff) | |
download | samba-e15921110a6e88b26ed978e5f3697404f673acf7.tar.gz samba-e15921110a6e88b26ed978e5f3697404f673acf7.tar.bz2 samba-e15921110a6e88b26ed978e5f3697404f673acf7.zip |
Removed a dead function.
(This used to be commit 4c8ce7af4625bd2a47006fa4b3cf9cb40d62841a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index a1e63475cf..df78a218b1 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -96,114 +96,6 @@ BOOL do_lsa_open_policy(struct cli_state *cli, } /**************************************************************************** -do a LSA Lookup SIDs -****************************************************************************/ - -BOOL do_lsa_lookup_sids(struct cli_state *cli, - POLICY_HND *hnd, - int num_sids, - DOM_SID **sids, - char ***names, - int *num_names) -{ - prs_struct rbuf; - prs_struct buf; - LSA_Q_LOOKUP_SIDS q_l; - LSA_R_LOOKUP_SIDS r_l; - DOM_R_REF ref; - LSA_TRANS_NAME_ENUM t_names; - int i; - BOOL valid_response = False; - - if (hnd == NULL || num_sids == 0 || sids == NULL) - return False; - - prs_init(&buf , MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, 4, cli->mem_ctx, UNMARSHALL ); - - /* create and send a MSRPC command with api LSA_LOOKUP_SIDS */ - - DEBUG(4,("LSA Lookup SIDs\n")); - - /* store the parameters */ - init_q_lookup_sids(&q_l, hnd, num_sids, sids, 1); - - /* turn parameters into data stream */ - if(!lsa_io_q_lookup_sids("", &q_l, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, LSA_LOOKUPSIDS, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - r_l.dom_ref = &ref; - r_l.names = &t_names; - - if(!lsa_io_r_lookup_sids("", &r_l, &rbuf, 0)) { - DEBUG(0,("do_lsa_lookup_sids: Failed to unmarshall LSA_R_LOOKUP_SIDS\n")); - prs_mem_free(&rbuf); - return False; - } - - - if (r_l.status != 0) { - /* report error code */ - DEBUG(0,("LSA_LOOKUP_SIDS: %s\n", get_nt_error_msg(r_l.status))); - } else { - if (t_names.ptr_trans_names != 0) - valid_response = True; - } - - if(!valid_response) { - prs_mem_free(&rbuf); - return False; - } - - if (num_names != NULL) - (*num_names) = t_names.num_entries; - - for (i = 0; i < t_names.num_entries; i++) { - if (t_names.name[i].domain_idx >= ref.num_ref_doms_1) { - DEBUG(0,("LSA_LOOKUP_SIDS: domain index out of bounds\n")); - prs_mem_free(&rbuf); - return False; - } - } - - if (names != NULL && t_names.num_entries != 0) - (*names) = (char**)malloc((*num_names) * sizeof(char*)); - - if (names != NULL && (*names) != NULL) { - /* take each name, construct a \DOMAIN\name string */ - for (i = 0; i < (*num_names); i++) { - fstring name; - fstring dom_name; - fstring full_name; - uint32 dom_idx = t_names.name[i].domain_idx; - fstrcpy(dom_name, dos_unistr2(ref.ref_dom[dom_idx].uni_dom_name.buffer)); - fstrcpy(name, dos_unistr2(t_names.uni_name[i].buffer)); - - slprintf(full_name, sizeof(full_name)-1, "\\%s\\%s", - dom_name, name); - - (*names)[i] = strdup(full_name); - } - } - - prs_mem_free(&rbuf); - - return valid_response; -} - -/**************************************************************************** do a LSA Query Info Policy ****************************************************************************/ BOOL do_lsa_query_info_pol(struct cli_state *cli, |