diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-09-29 13:34:58 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-10-01 08:28:50 +0200 |
commit | f23599f59415f367c7a11b89e5ceac1d6032b87f (patch) | |
tree | 51c8fe3fb7379dec3f1244b91c728f1596cca37f /source/winbindd/winbindd_util.c | |
parent | 4cfb63a07d7748d58dd869cdbb48f813534a8dea (diff) | |
download | samba-f23599f59415f367c7a11b89e5ceac1d6032b87f.tar.gz samba-f23599f59415f367c7a11b89e5ceac1d6032b87f.tar.xz samba-f23599f59415f367c7a11b89e5ceac1d6032b87f.zip |
re-added "winbind:ignore domains" patch
This option really is essential, as we discover again and again at
customer sites. Due to bugs in winbind some domains are toxic. When
you are installing at a site and a particular domain in a complex
setup causes winbind to segfault or hang then you need a way to
disable that domain and continue.
In an ideal world winbind could handle arbitrarily complex ADS
domains, but we are nowhere near that yet. If we ever get to that
stage then we won't need this option.
(cherry picked from commit f0f2fbd4800fb4a1df26f03f37b9972101657fdd)
Diffstat (limited to 'source/winbindd/winbindd_util.c')
-rw-r--r-- | source/winbindd/winbindd_util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c index e7b65763175..7847d1d3158 100644 --- a/source/winbindd/winbindd_util.c +++ b/source/winbindd/winbindd_util.c @@ -111,7 +111,16 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const const char *alternative_name = NULL; char *idmap_config_option; const char *param; + const char **ignored_domains, **dom; + ignored_domains = lp_parm_string_list(-1, "winbind", "ignore domains", NULL); + for (dom=ignored_domains; dom && *dom; dom++) { + if (gen_fnmatch(*dom, domain_name) == 0) { + DEBUG(2,("Ignoring domain '%s'\n", domain_name)); + return NULL; + } + } + /* ignore alt_name if we are not in an AD domain */ if ( (lp_security() == SEC_ADS) && alt_name && *alt_name) { @@ -436,6 +445,10 @@ static void rescan_forest_root_trusts( void ) &dom_list[i].sid ); } + if (d == NULL) { + continue; + } + DEBUG(10,("rescan_forest_root_trusts: Following trust path " "for domain tree root %s (%s)\n", d->name, d->alt_name )); @@ -500,6 +513,10 @@ static void rescan_forest_trusts( void ) &cache_methods, &dom_list[i].sid ); } + + if (d == NULL) { + continue; + } DEBUG(10,("Following trust path for domain %s (%s)\n", d->name, d->alt_name )); |