summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-11 06:15:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:18 -0500
commit79a1d083246caf41c5ae99a1445ad2f84010ba45 (patch)
tree82000f5818323718d913b49c81295130927c4696 /source4
parent459a2301a5d63f5a1a6b27996c8a0358b20f2ab2 (diff)
downloadsamba-79a1d083246caf41c5ae99a1445ad2f84010ba45.tar.gz
samba-79a1d083246caf41c5ae99a1445ad2f84010ba45.tar.bz2
samba-79a1d083246caf41c5ae99a1445ad2f84010ba45.zip
r18362: Make LookupSids map onto LookupSids2, as they both take a policy
handle. Avoids a lookup for the basic domain information for every request. Andrew Bartlett (This used to be commit 35b69bc5f4bda7f4f2480997cc32188154a175ce)
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 5c0cc79575..a5c1addb5d 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -1704,26 +1704,27 @@ static NTSTATUS lsa_LookupSids3(struct dcesrv_call_state *dce_call,
static NTSTATUS lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct lsa_LookupSids *r)
{
- struct lsa_LookupSids3 r3;
+ struct lsa_LookupSids2 r2;
NTSTATUS status;
int i;
- r3.in.sids = r->in.sids;
- r3.in.names = NULL;
- r3.in.level = r->in.level;
- r3.in.count = r->in.count;
- r3.in.unknown1 = 0;
- r3.in.unknown2 = 0;
- r3.out.count = r->out.count;
- r3.out.names = NULL;
+ r2.in.handle = r->in.handle;
+ r2.in.sids = r->in.sids;
+ r2.in.names = NULL;
+ r2.in.level = r->in.level;
+ r2.in.count = r->in.count;
+ r2.in.unknown1 = 0;
+ r2.in.unknown2 = 0;
+ r2.out.count = r->out.count;
+ r2.out.names = NULL;
- status = lsa_LookupSids3(dce_call, mem_ctx, &r3);
+ status = lsa_LookupSids2(dce_call, mem_ctx, &r2);
if (dce_call->fault_code != 0) {
return status;
}
- r->out.domains = r3.out.domains;
- if (!r3.out.names) {
+ r->out.domains = r2.out.domains;
+ if (!r2.out.names) {
r->out.names = NULL;
return status;
}
@@ -1732,16 +1733,16 @@ static NTSTATUS lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
if (r->out.names == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.names->count = r3.out.names->count;
+ r->out.names->count = r2.out.names->count;
r->out.names->names = talloc_array(r->out.names, struct lsa_TranslatedName,
r->out.names->count);
if (r->out.names->names == NULL) {
return NT_STATUS_NO_MEMORY;
}
for (i=0;i<r->out.names->count;i++) {
- r->out.names->names[i].sid_type = r3.out.names->names[i].sid_type;
- r->out.names->names[i].name.string = r3.out.names->names[i].name.string;
- r->out.names->names[i].sid_index = r3.out.names->names[i].sid_index;
+ r->out.names->names[i].sid_type = r2.out.names->names[i].sid_type;
+ r->out.names->names[i].name.string = r2.out.names->names[i].name.string;
+ r->out.names->names[i].sid_index = r2.out.names->names[i].sid_index;
}
return status;