svn commit: samba r17300 - in branches/SAMBA_4_0/source/lib/ldb/ldb_ildap: .

abartlet at samba.org abartlet at samba.org
Sat Jul 29 01:22:23 GMT 2006


Author: abartlet
Date: 2006-07-29 01:22:22 +0000 (Sat, 29 Jul 2006)
New Revision: 17300

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

Log:
Try to fix some segfaults in ldb_ildap module, when the remote server
drops the connection.  The reconnect code needs to be hooked in here.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c	2006-07-29 01:13:53 UTC (rev 17299)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c	2006-07-29 01:22:22 UTC (rev 17300)
@@ -360,6 +360,11 @@
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
+	if (!req->conn) {
+		ldb_set_errstring(module->ldb, talloc_asprintf(module, "connection to remote LDAP server dropped?"));
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
 	ildb_ac->req = talloc_steal(ildb_ac, req);
 	ildb_ac->module = module;
 	ildb_ac->context = context;
@@ -802,7 +807,7 @@
 		goto failed;
 	}
 
-	if (flags == LDB_FLG_RECONNECT) {
+	if (flags & LDB_FLG_RECONNECT) {
 		ldap_set_reconn_params(ildb->ldap, 10);
 	}
 



More information about the samba-cvs mailing list