From 187663210055ecd7b717b3894e3189ca3aaa0ed2 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Nov 2001 03:29:00 +0000 Subject: [PATCH] Get list of trusted domains if we haven't fetched them yet. --- source/nsswitch/winbindd_misc.c | 3 +++ source/nsswitch/winbindd_user.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/source/nsswitch/winbindd_misc.c b/source/nsswitch/winbindd_misc.c index 34c340f258c..b06ee223a7d 100644 --- a/source/nsswitch/winbindd_misc.c +++ b/source/nsswitch/winbindd_misc.c @@ -140,6 +140,9 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state DEBUG(3, ("[%5d]: list trusted domains\n", state->pid)); + if (domain_list == NULL) + get_domain_info(); + for(domain = domain_list; domain; domain = domain->next) { /* Skip own domain */ diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c index c2792115899..8dc3e82f42d 100644 --- a/source/nsswitch/winbindd_user.c +++ b/source/nsswitch/winbindd_user.c @@ -302,6 +302,9 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state) /* Create sam pipes for each domain we know about */ + if (domain_list == NULL) + get_domain_info(); + for(tmp = domain_list; tmp != NULL; tmp = tmp->next) { struct getent_state *domain_state; @@ -608,6 +611,9 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) ctr.sam.info1 = &info1; + if (domain_list == NULL) + get_domain_info(); + for (domain = domain_list; domain; domain = domain->next) { NTSTATUS status; uint32 start_ndx = 0;