diff options
author | Tim Potter <tpot@samba.org> | 2003-01-13 03:45:31 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-01-13 03:45:31 +0000 |
commit | 089729c02cb2088e85f0e7f8ec79afb58fe98be7 (patch) | |
tree | a77b7a6e4f44ad1e10aa4e2b1b28330913f4722a /source/nsswitch | |
parent | f087fe546fd0c943dec022c657f849803f4b807e (diff) | |
download | samba-089729c02cb2088e85f0e7f8ec79afb58fe98be7.tar.gz samba-089729c02cb2088e85f0e7f8ec79afb58fe98be7.tar.xz samba-089729c02cb2088e85f0e7f8ec79afb58fe98be7.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.
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/winbindd.c | 6 | ||||
-rw-r--r-- | source/nsswitch/winbindd_misc.c | 6 | ||||
-rw-r--r-- | source/nsswitch/winbindd_util.c | 26 |
3 files changed, 10 insertions, 28 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index eadbf560746..815d6914853 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -714,12 +714,6 @@ BOOL winbind_setup_common(void) if (!winbindd_param_init()) return False; - /* Get list of domains we look up requests for. This includes the - domain which we are a member of as well as any trusted - domains. */ - - init_domain_list(); - /* Winbind daemon initialisation */ if (!winbindd_idmap_init()) diff --git a/source/nsswitch/winbindd_misc.c b/source/nsswitch/winbindd_misc.c index d656c3ca4d7..74748f1aed0 100644 --- a/source/nsswitch/winbindd_misc.c +++ b/source/nsswitch/winbindd_misc.c @@ -113,7 +113,11 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state have changed since we last looked. There may be a sequence number or something we should use but I haven't found it yet. */ - init_domain_list(); + if (!init_domain_list()) { + DEBUG(1, ("winbindd_list_trusted_domains: could not " + "refresh trusted domain list\n")); + return WINBINDD_ERROR; + } for(domain = domain_list(); domain; domain = domain->next) { diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index f5b4bb44972..6d39df9c0ad 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/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); |