summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-01-13 03:45:31 +0000
committerTim Potter <tpot@samba.org>2003-01-13 03:45:31 +0000
commitcf17d012e67e632ddc2f83f498486d6ac766a752 (patch)
treed2d107c88a18f42eb241b5ecd8e5559e0d492d1e /source3/nsswitch/winbindd_util.c
parentfd88966c470ec125476c9c8d4cb68678ac249e47 (diff)
downloadsamba-cf17d012e67e632ddc2f83f498486d6ac766a752.tar.gz
samba-cf17d012e67e632ddc2f83f498486d6ac766a752.tar.bz2
samba-cf17d012e67e632ddc2f83f498486d6ac766a752.zip
Merge of remove "winbindd holding pattern" from appliance. It's a bit
simpler as the rescanning of trusted domains helps us out a bit. (This used to be commit 089729c02cb2088e85f0e7f8ec79afb58fe98be7)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index f5b4bb4497..6d39df9c0a 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -202,7 +202,6 @@ void rescan_trusted_domains(void)
/* Look up global info for the winbind daemon */
BOOL init_domain_list(void)
{
- NTSTATUS result;
extern struct winbindd_methods cache_methods;
struct winbindd_domain *domain;
@@ -211,27 +210,12 @@ BOOL init_domain_list(void)
/* Add ourselves as the first entry */
domain = add_trusted_domain(lp_workgroup(), NULL, &cache_methods, NULL);
-
- /*
- * Now we *must* get the domain sid for our primary domain. Go into
- * a holding pattern until that is available
- */
-
- result = cache_methods.domain_sid(domain, &domain->sid);
- while (!NT_STATUS_IS_OK(result)) {
-
- sleep(10);
- DEBUG(1,("Retrying startup domain sid fetch for %s\n",
- domain->name));
- result = cache_methods.domain_sid(domain, &domain->sid);
-
- /* If we don't call lp_talloc_free() here we end up
- accumulating memory in the "global" lp_talloc in
- param/loadparm.c */
-
- lp_talloc_free();
+ if (!secrets_fetch_domain_sid(domain->name, &domain->sid)) {
+ DEBUG(1, ("Could not fetch sid for our domain %s\n",
+ domain->name));
+ return False;
}
-
+
/* get any alternate name for the primary domain */
cache_methods.alternate_name(domain);