[Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.5, 1.6

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Mon Nov 6 20:51:33 UTC 2006


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14694/servers/plugins/syntaxes

Modified Files:
	string.c 
Log Message:
Resolves: #199923
Summary: subtree search fails to find items under a db containing special characters (Comment#16)
Description: When dn contains rdn which includes '\\', it was escaped twice to generate a key for entrydn and caused mismatch in forming ancestorid index.  It ends up the subtree search fail.



Index: string.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- string.c	19 Apr 2005 22:07:35 -0000	1.5
+++ string.c	6 Nov 2006 20:51:30 -0000	1.6
@@ -319,8 +319,10 @@
 
 		for ( i = 0; i < numbvals; i++ )
 		{
-                    c = slapi_ch_strdup(slapi_value_get_string(bvals[i]));
-                    value_normalize( c, syntax, 1 /* trim leading blanks */ );
+			c = slapi_ch_strdup(slapi_value_get_string(bvals[i]));
+			/* if the NORMALIZED flag is set, skip normalizing */
+			if (!(slapi_value_get_flags(bvals[i]) & SLAPI_ATTR_FLAG_NORMALIZED))
+				value_normalize( c, syntax, 1 /* trim leading blanks */ );
 		    nbvals[i] = slapi_value_new_string_passin(c);
 		}
 		nbvals[i] = NULL;




More information about the Fedora-directory-commits mailing list