summaryrefslogtreecommitdiff
path: root/source4/libcli/rpc/rpc_lsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/rpc/rpc_lsa.c')
-rw-r--r--source4/libcli/rpc/rpc_lsa.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/source4/libcli/rpc/rpc_lsa.c b/source4/libcli/rpc/rpc_lsa.c
index 8e1a48857e..65d6a81491 100644
--- a/source4/libcli/rpc/rpc_lsa.c
+++ b/source4/libcli/rpc/rpc_lsa.c
@@ -35,7 +35,7 @@ NTSTATUS dcerpc_lsa_OpenPolicy(struct dcerpc_pipe *p,
NTSTATUS status;
TALLOC_CTX *mem_ctx;
- mem_ctx = talloc_init("dcerpc_rpcecho_addone");
+ mem_ctx = talloc_init("dcerpc_lsa_openpolicy");
if (!mem_ctx) {
return NT_STATUS_NO_MEMORY;
}
@@ -77,7 +77,7 @@ NTSTATUS dcerpc_lsa_OpenPolicy2(struct dcerpc_pipe *p,
NTSTATUS status;
TALLOC_CTX *mem_ctx;
- mem_ctx = talloc_init("dcerpc_rpcecho_addone");
+ mem_ctx = talloc_init("dcerpc_lsa_openpolicy2");
if (!mem_ctx) {
return NT_STATUS_NO_MEMORY;
}
@@ -104,3 +104,39 @@ done:
talloc_destroy(mem_ctx);
return status;
}
+
+/*
+ EnumSids interface
+*/
+NTSTATUS dcerpc_lsa_EnumSids(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32 resume_handle,
+ uint32 *num_entries,
+ struct dom_sid ***sids)
+{
+ struct lsa_EnumSids r;
+ NTSTATUS status;
+
+ /* fill the .in side of the call */
+ r.in.handle = handle;
+ r.in.start_at = 0;
+ r.in.num_entries = *num_entries;
+
+ /* make the call */
+ status = dcerpc_ndr_request(p, LSA_ENUM_ACCOUNTS, mem_ctx,
+ (ndr_push_fn_t) ndr_push_lsa_EnumSids,
+ (ndr_pull_fn_t) ndr_pull_lsa_EnumSids,
+ &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
+
+ /* and extract the .out parameters */
+ *num_entries = r.out.num_entries;
+ *sids = r.out.sids;
+ status = r.out.status;
+
+done:
+ return status;
+}