summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-25 12:15:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:14 -0500
commitc6f8330098dad8f7a78ccce9b76ad389e6a51aba (patch)
tree0f4831655f09e5b832d4c612df6c3b8e0de024f3 /source4
parent2a2a35005749766e407c2a106720e74b7dfcc005 (diff)
downloadsamba-c6f8330098dad8f7a78ccce9b76ad389e6a51aba.tar.gz
samba-c6f8330098dad8f7a78ccce9b76ad389e6a51aba.tar.bz2
samba-c6f8330098dad8f7a78ccce9b76ad389e6a51aba.zip
r11288: Fill out LSA LookupNames4 and LookupSids3, including a server-side
implementation. Andrew Bartlett (This used to be commit a6a615cc997cd3a71ea0d63994f6cd97096afc30)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/lsa.idl11
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c49
2 files changed, 42 insertions, 18 deletions
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index 5ff4214cbb..8a141bcd54 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -930,7 +930,16 @@
);
/* Function 0x4d */
- NTSTATUS lsa_LSARLOOKUPNAMES4();
+ NTSTATUS lsa_LookupNames4(
+ [in,range(0,1000)] uint32 num_names,
+ [in,size_is(num_names)] lsa_String names[],
+ [out,unique] lsa_RefDomainList *domains,
+ [in,out] lsa_TransSidArray3 *sids,
+ [in] uint16 level,
+ [in,out] uint32 *count,
+ [in] uint32 unknown1,
+ [in] uint32 unknown2
+ );
/* Function 0x4e */
NTSTATUS lsa_LSAROPENPOLICYSCE();
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index ca107adfbb..ca6fe36786 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -2515,23 +2515,18 @@ static NTSTATUS lsa_lookup_name(struct lsa_policy_state *state, TALLOC_CTX *mem_
/*
- lsa_LookupNames3
+ lsa_LookupNames4
*/
-static NTSTATUS lsa_LookupNames3(struct dcesrv_call_state *dce_call,
+static NTSTATUS lsa_LookupNames4(struct dcesrv_call_state *dce_call,
TALLOC_CTX *mem_ctx,
- struct lsa_LookupNames3 *r)
+ struct lsa_LookupNames4 *r)
{
struct lsa_policy_state *state;
- struct dcesrv_handle *h;
int i;
NTSTATUS status = NT_STATUS_OK;
r->out.domains = NULL;
- DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY);
-
- state = h->data;
-
r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
if (r->out.domains == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -2590,6 +2585,35 @@ static NTSTATUS lsa_LookupNames3(struct dcesrv_call_state *dce_call,
return status;
}
+/*
+ lsa_LookupNames3
+*/
+static NTSTATUS lsa_LookupNames3(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct lsa_LookupNames3 *r)
+{
+ struct lsa_LookupNames4 r2;
+ NTSTATUS status;
+ struct dcesrv_handle *h;
+ DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY);
+
+ r2.in.num_names = r->in.num_names;
+ r2.in.names = r->in.names;
+ r2.in.sids = r->in.sids;
+ r2.in.count = r->in.count;
+ r2.in.unknown1 = r->in.unknown1;
+ r2.in.unknown2 = r->in.unknown2;
+
+ status = lsa_LookupNames4(dce_call, mem_ctx, &r2);
+ if (dce_call->fault_code != 0) {
+ return status;
+ }
+
+ r->out.domains = r2.out.domains;
+ r->out.sids = r2.out.sids;
+ r->out.count = r2.out.count;
+ return status;
+}
+
/*
lsa_LookupNames2
*/
@@ -2861,15 +2885,6 @@ static NTSTATUS lsa_CREDRRENAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *
}
-/*
- lsa_LSARLOOKUPNAMES4
-*/
-static NTSTATUS lsa_LSARLOOKUPNAMES4(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct lsa_LSARLOOKUPNAMES4 *r)
-{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
/*
lsa_LSAROPENPOLICYSCE