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

Re: ldap_add: Invalid syntax



Try the following patch to servers/slapd/entry.c.  It is a patch to the 2.0
engineering release which will include the attribute name in the debug
messages for invalid syntax and no validator.

The head branch is quite different, IIRC, and I haven't figured out an
equivalent for it, or I suppose I would commit them both.

Index: entry.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/entry.c,v
retrieving revision 1.18.2.6
diff -u -r1.18.2.6 entry.c
--- entry.c	2000/10/11 02:46:47	1.18.2.6
+++ entry.c	2000/12/11 17:54:38
@@ -144,8 +144,9 @@
 
 			if( !validate ) {
 				Debug( LDAP_DEBUG_ANY,
-					"str2entry: no validator for syntax %s\n",
-					ad->ad_type->sat_syntax->ssyn_oid, 0, 0 );
+					"str2entry: no validator for syntax %s, type %s\n",
+					ad->ad_type->sat_syntax->ssyn_oid, 
+					ad->ad_type->sat_cname, 0 );
 				entry_free( e );
 				free( value.bv_val );
 				free( type );
@@ -159,8 +160,9 @@
 
 			if( rc != 0 ) {
 				Debug( LDAP_DEBUG_ANY,
-					"str2entry: invalid value for syntax %s\n",
-					ad->ad_type->sat_syntax->ssyn_oid, 0, 0 );
+					"str2entry: invalid value for syntax %s, type %s\n",
+					ad->ad_type->sat_syntax->ssyn_oid, 
+					ad->ad_type->sat_cname, 0 );
 				entry_free( e );
 				free( value.bv_val );
 				free( type );