svn commit: samba r19391 - in branches/SAMBA_3_0/source/nsswitch: .

gd at samba.org gd at samba.org
Wed Oct 18 14:22:09 GMT 2006


Author: gd
Date: 2006-10-18 14:22:08 +0000 (Wed, 18 Oct 2006)
New Revision: 19391

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19391

Log:
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

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-10-18 12:23:58 UTC (rev 19390)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-10-18 14:22:08 UTC (rev 19391)
@@ -443,6 +443,11 @@
 
 	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;



More information about the samba-cvs mailing list