summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-04-14 11:21:25 +0000
committerTim Potter <tpot@samba.org>2002-04-14 11:21:25 +0000
commitd0386372b2f491cd9281fc6466b1b5d2f5cf59a9 (patch)
tree5f9544811c5b2c37a45b1db91ebff33e3a3a0519 /source3/nsswitch
parent3a139656a336ac0b86632b9a32ed32ed85c969c0 (diff)
downloadsamba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.tar.gz
samba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.tar.bz2
samba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.zip
The cli_lsa_lookup_{names,sids} functions were returning useless
information when one or more of the names/sids being queried were not resolvable. We now return a list the same length as the parameters passed instead of an array of just the resolvable names/sids. (This used to be commit 245468dbabb7c849ce423cc3cb586fa913d0adfe)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_rpc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c
index 5af42ee041..39433419b0 100644
--- a/source3/nsswitch/winbindd_rpc.c
+++ b/source3/nsswitch/winbindd_rpc.c
@@ -187,7 +187,6 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
NTSTATUS status;
DOM_SID *sids = NULL;
uint32 *types = NULL;
- int num_sids;
const char *full_name;
if (!(mem_ctx = talloc_init_named("name_to_sid[rpc] for [%s]\\[%s]", domain->name, name))) {
@@ -209,9 +208,10 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
}
status = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol, 1,
- &full_name, &sids, &types, &num_sids);
+ &full_name, &sids, &types);
- /* Return rid and type if lookup successful */
+ /* Return rid and type if lookup successful */
+
if (NT_STATUS_IS_OK(status)) {
sid_copy(sid, &sids[0]);
*type = types[0];
@@ -234,15 +234,13 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
char **domains;
char **names;
uint32 *types;
- int num_names;
NTSTATUS status;
if (!(hnd = cm_get_lsa_handle(domain->name)))
return NT_STATUS_UNSUCCESSFUL;
status = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
- 1, sid, &domains, &names, &types,
- &num_names);
+ 1, sid, &domains, &names, &types);
if (NT_STATUS_IS_OK(status)) {
*type = types[0];