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

a small patch for back-sql



Pierangelo,

back-sql fails to compile with BACKSQL_TRACE defined, I think this is the correct fix.

It also appears that objectClass searches fail (with mysql odbc) if there is no data in the ldap_entry_objclasses table. Just a simple dummy entry like this is enough to fix the problem.

+----------+----------+
| entry_id | oc_name  |
+----------+----------+
|        0 | dcObject |
+----------+----------+

Let me know if you'd like more information.

I believe this is the issue noted here...

http://www.openldap.org/lists/openldap-software/200508/msg00450.html

Regards,

Rob

--
Robert Brooks,           Network Manager,          Cable & Wireless UK
<robb@wtg.cw.com>                                   http://wtg.cw.com/
Tel: +44 (0)20 7339 8600                      Fax: +44 (0)20 7339 8601
-              "What was your username again?" - BOFH                -
diff -ru openldap-2.3.30.orig/servers/slapd/back-sql/util.c openldap-2.3.30/servers/slapd/back-sql/util.c
--- openldap-2.3.30.orig/servers/slapd/back-sql/util.c	Tue Jan  3 22:16:24 2006
+++ openldap-2.3.30/servers/slapd/back-sql/util.c	Fri Dec 15 21:10:48 2006
@@ -252,7 +252,7 @@
 
 #ifdef BACKSQL_TRACE
 	Debug( LDAP_DEBUG_TRACE, "backsql_entry_addattr(\"%s\"): %s=%s\n", 
-		e->e_name.bv_val, ad->ad_cname->bv_val, val->bv_val );
+		e->e_name.bv_val, ad->ad_cname.bv_val, val->bv_val );
 #endif /* BACKSQL_TRACE */
 
 	rc = attr_merge_normalize_one( e, ad, val, memctx );