summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-10-18 14:22:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:32 -0500
commitedba79e500ff8edeca104fdd616cea444ce93715 (patch)
tree553690090cff24d75f7143cb9578ccf0d36c8eda
parentea032c024df4c7c8ca41adeb2357b7b07026c516 (diff)
downloadsamba-edba79e500ff8edeca104fdd616cea444ce93715.tar.gz
samba-edba79e500ff8edeca104fdd616cea444ce93715.tar.bz2
samba-edba79e500ff8edeca104fdd616cea444ce93715.zip
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)
-rw-r--r--source3/nsswitch/winbindd_cache.c5
1 files changed, 5 insertions, 0 deletions
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;