summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_lsa.h13
-rw-r--r--source3/rpc_client/cli_lsarpc.c56
-rw-r--r--source3/rpc_parse/parse_lsa.c84
3 files changed, 0 insertions, 153 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index 46a01d53e5..0e61b7b2d9 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -495,19 +495,6 @@ typedef struct
} LSA_R_REMOVE_ACCT_RIGHTS;
-typedef struct lsa_q_enumprivsaccount
-{
- POLICY_HND pol; /* policy handle */
-} LSA_Q_ENUMPRIVSACCOUNT;
-
-typedef struct lsa_r_enumprivsaccount
-{
- uint32 ptr;
- uint32 count;
- PRIVILEGE_SET set;
- NTSTATUS status;
-} LSA_R_ENUMPRIVSACCOUNT;
-
typedef struct {
UNIHDR hdr;
UNISTR2 unistring;
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 20a0fe28b6..c5ad98c3ad 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 user privileges
- *
- * @param cli Handle on an initialised SMB connection */
-
-NTSTATUS rpccli_lsa_enum_privsaccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 *count, LUID_ATTR **set)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_ENUMPRIVSACCOUNT q;
- LSA_R_ENUMPRIVSACCOUNT r;
- NTSTATUS result;
- int i;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise input parameters */
-
- init_lsa_q_enum_privsaccount(&q, pol);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_ENUMPRIVSACCOUNT,
- q, r,
- qbuf, rbuf,
- lsa_io_q_enum_privsaccount,
- lsa_io_r_enum_privsaccount,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- if (r.count == 0)
- goto done;
-
- if (!((*set = TALLOC_ARRAY(mem_ctx, LUID_ATTR, r.count)))) {
- DEBUG(0, ("(cli_lsa_enum_privsaccount): out of memory\n"));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- for (i=0; i<r.count; i++) {
- (*set)[i].luid.low = r.set.set[i].luid.low;
- (*set)[i].luid.high = r.set.set[i].luid.high;
- (*set)[i].attr = r.set.set[i].attr;
- }
-
- *count=r.count;
- done:
-
- return result;
-}
-
/** Get a privilege value given its name */
NTSTATUS rpccli_lsa_lookup_priv_value(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 6a80bb28a8..2230c9147f 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -1207,30 +1207,6 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru
return True;
}
-void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd)
-{
- memcpy(&trn->pol, hnd, sizeof(trn->pol));
-
-}
-
-/*******************************************************************
- Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure.
-********************************************************************/
-
-bool lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "lsa_io_q_enum_privsaccount");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol", &out->pol, ps, depth))
- return False;
-
- return True;
-}
-
/*******************************************************************
Reads or writes an LUID structure.
********************************************************************/
@@ -1300,66 +1276,6 @@ static bool lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struc
return True;
}
-NTSTATUS init_lsa_r_enum_privsaccount(TALLOC_CTX *mem_ctx, LSA_R_ENUMPRIVSACCOUNT *out, LUID_ATTR *set, uint32 count, uint32 control)
-{
- NTSTATUS ret = NT_STATUS_OK;
-
- out->ptr = 1;
- out->count = count;
-
- if ( !NT_STATUS_IS_OK(ret = privilege_set_init_by_ctx(mem_ctx, &(out->set))) )
- return ret;
-
- out->set.count = count;
-
- if (!NT_STATUS_IS_OK(ret = dup_luid_attr(out->set.mem_ctx, &(out->set.set), set, count)))
- return ret;
-
- DEBUG(10,("init_lsa_r_enum_privsaccount: %d privileges\n", out->count));
-
- return ret;
-}
-
-/*******************************************************************
- Reads or writes an LSA_R_ENUMPRIVSACCOUNT structure.
-********************************************************************/
-
-bool lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *out, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "lsa_io_r_enum_privsaccount");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr", ps, depth, &out->ptr))
- return False;
-
- if (out->ptr!=0) {
- if(!prs_uint32("count", ps, depth, &out->count))
- return False;
-
- /* malloc memory if unmarshalling here */
-
- if (UNMARSHALLING(ps) && out->count != 0) {
- if (!NT_STATUS_IS_OK(privilege_set_init_by_ctx(ps->mem_ctx, &(out->set))))
- return False;
-
- if (!(out->set.set = PRS_ALLOC_MEM(ps,LUID_ATTR,out->count)))
- return False;
-
- }
-
- if(!lsa_io_privilege_set(desc, &out->set, ps, depth))
- return False;
- }
-
- if(!prs_ntstatus("status", ps, depth, &out->status))
- return False;
-
- return True;
-}
-
void init_lsa_string( LSA_STRING *uni, const char *string )
{
init_unistr2(&uni->unistring, string, UNI_FLAGS_NONE);