Remove unused marshalling for LSA_ENUM_ACCOUNTS.
authorGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 00:34:34 +0000 (01:34 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 00:34:34 +0000 (01:34 +0100)
Guenther
(This used to be commit 8c476ad51622f76bf8f03f6255369b8e19f24a72)

source3/include/rpc_lsa.h
source3/rpc_client/cli_lsarpc.c
source3/rpc_parse/parse_lsa.c

index 724a980b45a5fe6fdc944337774ed222eb00db24..46a01d53e5d9e5b21afba3b0356421c3b1f38cad 100644 (file)
@@ -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 */
index c42938d6e905112751747f7c56b6c4bb2a53cd21..20a0fe28b61fe9f02a0557e13a4a464e13693e14 100644 (file)
@@ -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 */
index b8a0b032733100993d1e01776841f446765d6213..6a80bb28a82aa5ad2744cff727074650fd8afbde 100644 (file)
@@ -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));