From edba79e500ff8edeca104fdd616cea444ce93715 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 18 Oct 2006 14:22:08 +0000 Subject: r19391: Fix crash bug within the winbind caching method. That one was hard to find: when coming from offline mode and switching to online, a refresh sequence number call (using the default MS-RPC mechanism) may reset domain->backend to NULL (by the set_domain_online event). We need to make sure to reidentify the remote domain in that case. Guenther (This used to be commit 4d6503d1377a262ba8b87f344be7daf04e011ef2) --- source3/nsswitch/winbindd_cache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/nsswitch/winbindd_cache.c') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 8acd5cfd20..cf161c11b6 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -443,6 +443,11 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force) status = domain->backend->sequence_number(domain, &domain->sequence_number); + /* the above call could have set our domain->backend to NULL when + * coming from offline to online mode, make sure to reinitialize the + * backend - Guenther */ + get_cache( domain ); + if (!NT_STATUS_IS_OK(status)) { DEBUG(10,("refresh_sequence_number: failed with %s\n", nt_errstr(status))); domain->sequence_number = DOM_SEQUENCE_NONE; -- cgit