summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_lsa.h16
-rw-r--r--source3/rpc_client/cli_lsarpc.c56
-rw-r--r--source3/rpc_parse/parse_lsa.c84
3 files changed, 0 insertions, 156 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index 724a980b45..46a01d53e5 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -495,22 +495,6 @@ typedef struct
} LSA_R_REMOVE_ACCT_RIGHTS;
-/* LSA_Q_ENUM_ACCOUNTS */
-typedef struct lsa_q_enum_accounts
-{
- POLICY_HND pol; /* policy handle */
- uint32 enum_context;
- uint32 pref_max_length;
-} LSA_Q_ENUM_ACCOUNTS;
-
-/* LSA_R_ENUM_ACCOUNTS */
-typedef struct lsa_r_enum_accounts
-{
- uint32 enum_context;
- LSA_SID_ENUM sids;
- NTSTATUS status;
-} LSA_R_ENUM_ACCOUNTS;
-
typedef struct lsa_q_enumprivsaccount
{
POLICY_HND pol; /* policy handle */
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index c42938d6e9..20a0fe28b6 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -452,62 +452,6 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
return result;
}
-/** Enumerate list of SIDs */
-
-NTSTATUS rpccli_lsa_enum_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length,
- uint32 *num_sids, DOM_SID **sids)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_ENUM_ACCOUNTS q;
- LSA_R_ENUM_ACCOUNTS r;
- NTSTATUS result;
- int i;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- init_lsa_q_enum_accounts(&q, pol, *enum_ctx, pref_max_length);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_ENUM_ACCOUNTS,
- q, r,
- qbuf, rbuf,
- lsa_io_q_enum_accounts,
- lsa_io_r_enum_accounts,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- if (r.sids.num_entries==0)
- goto done;
-
- /* Return output parameters */
-
- *sids = TALLOC_ARRAY(mem_ctx, DOM_SID, r.sids.num_entries);
- if (!*sids) {
- DEBUG(0, ("(cli_lsa_enum_sids): out of memory\n"));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- /* Copy across names and sids */
-
- for (i = 0; i < r.sids.num_entries; i++) {
- sid_copy(&(*sids)[i], &r.sids.sid[i].sid);
- }
-
- *num_sids= r.sids.num_entries;
- *enum_ctx = r.enum_context;
-
- done:
-
- return result;
-}
-
/** Enumerate user privileges
*
* @param cli Handle on an initialised SMB connection */
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index b8a0b03273..6a80bb28a8 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -1207,90 +1207,6 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru
return True;
}
-/*
- initialise a LSA_Q_ENUM_ACCOUNTS structure
-*/
-void init_lsa_q_enum_accounts(LSA_Q_ENUM_ACCOUNTS *trn, POLICY_HND *hnd, uint32 enum_context, uint32 pref_max_length)
-{
- memcpy(&trn->pol, hnd, sizeof(trn->pol));
-
- trn->enum_context = enum_context;
- trn->pref_max_length = pref_max_length;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-bool lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *in, prs_struct *ps, int depth)
-{
- if (in == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "lsa_io_q_enum_accounts");
- 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;
-}
-
-
-/*******************************************************************
- Inits an LSA_R_ENUM_PRIVS structure.
-********************************************************************/
-
-void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *out, uint32 enum_context)
-{
- DEBUG(5, ("init_lsa_r_enum_accounts\n"));
-
- out->enum_context=enum_context;
- if (out->enum_context!=0) {
- out->sids.num_entries=enum_context;
- out->sids.ptr_sid_enum=1;
- out->sids.num_entries2=enum_context;
- } else {
- out->sids.num_entries=0;
- out->sids.ptr_sid_enum=0;
- out->sids.num_entries2=0;
- }
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-bool lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *out, prs_struct *ps, int depth)
-{
- if (out == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "lsa_io_r_enum_accounts");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if(!prs_uint32("enum_context", ps, depth, &out->enum_context))
- return False;
-
- if (!lsa_io_sid_enum("sids", &out->sids, 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_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd)
{
memcpy(&trn->pol, hnd, sizeof(trn->pol));