diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-13 12:20:26 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-13 12:22:31 +0100 |
commit | 026b23062eeee23dffeb627800b3cb6f55d89ad6 (patch) | |
tree | da03ee2b07d0f76c03edd545e9624aa19487d1fe /source3/winbindd | |
parent | 5d1aa4c5b796ad5e65f7447414d09c059f060946 (diff) | |
download | samba-026b23062eeee23dffeb627800b3cb6f55d89ad6.tar.gz samba-026b23062eeee23dffeb627800b3cb6f55d89ad6.tar.bz2 samba-026b23062eeee23dffeb627800b3cb6f55d89ad6.zip |
s3: Fix a winbind segfault in "trusted_domains"
We have to initialize domain->backend by calling "get_cache" before doing a
query
Thanks to Christian Ambach to find this :-)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index b7b5e6d7ed..a9690aea1c 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -2715,15 +2715,16 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, old_status = domain->online; trusts->count = 0; trusts->array = NULL; - if (domain->online) { - goto do_query; - } cache = get_cache(domain); if (!cache || !cache->tdb) { goto do_query; } + if (domain->online) { + goto do_query; + } + retval = wcache_tdc_fetch_list(&dom_list, &num_domains); if (!retval || !num_domains || !dom_list) { TALLOC_FREE(dom_list); |