svn commit: samba r18224 - in branches/SAMBA_3_0/source: nsswitch smbd

jra at samba.org jra at samba.org
Thu Sep 7 16:51:17 GMT 2006


Author: jra
Date: 2006-09-07 16:51:17 +0000 (Thu, 07 Sep 2006)
New Revision: 18224

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

Log:
Paranoia - ensure the oplock event handler is
removed immediately in the handler.
Extra debug info tracking down winbindd DC
selection.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0/source/smbd/oplock.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-07 14:24:18 UTC (rev 18223)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-07 16:51:17 UTC (rev 18224)
@@ -296,6 +296,9 @@
 
 	struct sockaddr_in *peeraddr_in = (struct sockaddr_in *)&peeraddr;
 
+	DEBUG(10,("cm_prepare_connection: connecting to DC %s for domain %s\n",
+		controller, domain->name ));
+
 	machine_password = secrets_fetch_machine_password(lp_workgroup(), NULL,
 							  NULL);
 	
@@ -921,6 +924,9 @@
 
 	if ( saf_servername && NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, saf_servername))) {
 
+		DEBUG(10,("cm_open_connection: saf_servername is '%s' for domain %s\n",
+			saf_servername, domain->name ));
+
 		/* convert an ip address to a name */
 		if ( is_ipaddress( saf_servername ) ) {
 			fstring saf_name;
@@ -949,7 +955,10 @@
 
 		result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
 
-		if ((strlen(domain->dcname) > 0)
+		DEBUG(10,("cm_open_connection: dcname is '%s' for domain %s\n",
+			domain->dcname, domain->name ));
+
+		if (*domain->dcname 
 			&& NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, domain->dcname))
 			&& (resolve_name(domain->dcname, &domain->dcaddr.sin_addr, 0x20)))
 		{

Modified: branches/SAMBA_3_0/source/smbd/oplock.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock.c	2006-09-07 14:24:18 UTC (rev 18223)
+++ branches/SAMBA_3_0/source/smbd/oplock.c	2006-09-07 16:51:17 UTC (rev 18224)
@@ -348,6 +348,12 @@
 {
 	files_struct *fsp = (files_struct *)private_data;
 
+	/* Ensure we always remove this event. */
+	if (fsp->oplock_timeout != NULL) {
+		/* Remove the timed event handler. */
+		TALLOC_FREE(fsp->oplock_timeout);
+		fsp->oplock_timeout = NULL;
+	}
 	DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp->fsp_name));
 	global_client_failed_oplock_break = True;
 	remove_oplock(fsp);



More information about the samba-cvs mailing list