[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4110) openldap 2.2.28 crash when running with sql backend



--=-odgby4Yr+iBALshJ5wch
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2005-10-25 at 18:38 +0000, dcmwai@pl.jaring.my wrote:
> Full_Name: Chan Min Wai
> Version: 2.2.28
> OS: gentoo
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (219.95.246.229)
> 
> 
> I'm using openldap 2.2.28 + unixodbc 2.2.11-r1 with postgresql 8.0.3

back-sql is not actively maintained in OpenLDAP 2.2, which is feature
frozen.  back-sql has undergone large improvements in OpenLDAP 2.3; I
suggest you try using that.  A few fixes are required in 2.3.11, which
will be in the next release; they mostly refer to add & delete of the
root entry of the database, but in general I'd consider back-sql from
2.3.12, when it will be out, the most recommendable version.  In the
meanwhile, you should be able to work fine with 2.3.11 and the attached
patch (add/delete will still have few issues that are fixed in HEAD).

Unless the problem you're indicating can be easily worked around, I
don't think this issue will be considered.

p.



Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------


--=-odgby4Yr+iBALshJ5wch
Content-Disposition: attachment; filename=openldap-2.3.11-back-sql.1.patch
Content-Type: text/x-patch; name=openldap-2.3.11-back-sql.1.patch; charset=utf-8
Content-Transfer-Encoding: 7bit

Index: entry-id.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-sql/entry-id.c,v
retrieving revision 1.46.2.6
retrieving revision 1.63
diff -u -r1.46.2.6 -r1.63
--- entry-id.c	28 Sep 2005 00:30:34 -0000	1.46.2.6
+++ entry-id.c	6 Nov 2005 22:34:33 -0000	1.63
@@ -460,10 +460,10 @@
 				oldcount = 0,
 				res = 0;
 #ifdef BACKSQL_COUNTQUERY
-	unsigned long		count,
-				countsize = sizeof( count ),
+	unsigned 		count,
 				j,
 				append = 0;
+	SQLLEN			countsize = sizeof( count );
 	Attribute		*attr = NULL;
 
 	slap_mr_normalize_func		*normfunc = NULL;
Index: sql-wrap.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-sql/sql-wrap.c,v
retrieving revision 1.28.2.3
retrieving revision 1.40
diff -u -r1.28.2.3 -r1.40
--- sql-wrap.c	9 Aug 2005 21:04:06 -0000	1.28.2.3
+++ sql-wrap.c	7 Nov 2005 00:07:59 -0000	1.40
@@ -257,9 +257,10 @@
 backsql_close_db_conn( void *v_conn )
 {
 	backsql_db_conn	*conn = 	(backsql_db_conn *)v_conn;
+	unsigned long	cid = conn->ldap_cid;
 
 	Debug( LDAP_DEBUG_TRACE, "==>backsql_close_db_conn(%lu)\n",
-		conn->ldap_cid, 0, 0 );
+		cid, 0, 0 );
 
 	/*
 	 * Default transact is SQL_ROLLBACK; commit is required only
@@ -274,7 +275,7 @@
 	ch_free( conn );
 
 	Debug( LDAP_DEBUG_TRACE, "<==backsql_close_db_conn(%lu)\n",
-		conn->ldap_cid, 0, 0 );
+		cid, 0, 0 );
 }
 
 int

--=-odgby4Yr+iBALshJ5wch--