From 026b23062eeee23dffeb627800b3cb6f55d89ad6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 13 Jan 2010 12:20:26 +0100 Subject: 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 :-) --- source3/winbindd/winbindd_cache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3') 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); -- cgit