summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-01-15 23:32:47 +0000
committerTim Potter <tpot@samba.org>2003-01-15 23:32:47 +0000
commitf167d37bcd2a129888e799690d2597098590f246 (patch)
tree816ea05d9545da9f1a61790e4d56e8d76e109053 /source3
parentd7ed1e1362587d8b472f03db0781c37dff1b72af (diff)
downloadsamba-f167d37bcd2a129888e799690d2597098590f246.tar.gz
samba-f167d37bcd2a129888e799690d2597098590f246.tar.bz2
samba-f167d37bcd2a129888e799690d2597098590f246.zip
Merge of holding pattern stuff from HEAD.
(This used to be commit bf8bb62023bcd38e5bc53ef1ac2183360d6ff734)
Diffstat (limited to 'source3')
-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 3671c88e2b..7a5fa3be20 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -199,7 +199,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;
@@ -208,27 +207,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);