From: Pierangelo Masarati Date: Sun, 9 Jan 2005 20:15:40 +0000 (+0000) Subject: fix ITS#3474 X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~445 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9c40a1869bd8daeeac1f0017dd8c782633b6d0cd;p=openldap fix ITS#3474 --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index bf154dbf45..ca45d8247f 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -438,10 +438,9 @@ ldap_dn_normalize( LDAP_CONST char *dnin, * as "\=", but it is treated as a regular char, i.e. it can also * appear as '='. * - * As such, we currently choose to allow reading unescaped '=', - * but we always produce escaped '\3D'; this may change in the - * future, if compatibility issues do not arise */ -#ifdef LDAP_DEVEL + * As such, in 2.2 we used to allow reading unescaped '=', + * but we always produced escaped '\3D'; this changes + * since 2.3, if compatibility issues do not arise */ #define LDAP_DN_NE(c) \ ( LDAP_DN_RDN_SEP_V2(c) || LDAP_DN_AVA_SEP(c) \ || LDAP_DN_QUOTES(c) \ @@ -451,17 +450,7 @@ ldap_dn_normalize( LDAP_CONST char *dnin, || LDAP_DN_AVA_EQUALS(c) \ || LDAP_DN_ASCII_SPACE(c) || LDAP_DN_OCTOTHORPE(c) ) #define LDAP_DN_SHOULDESCAPE(c) ( LDAP_DN_AVA_EQUALS(c) ) -#else /* ! LDAP_DEVEL */ -#define LDAP_DN_NE(c) \ - ( LDAP_DN_RDN_SEP_V2(c) || LDAP_DN_AVA_SEP(c) \ - || LDAP_DN_AVA_EQUALS(c) || LDAP_DN_QUOTES(c) \ - || (c) == '<' || (c) == '>' ) -#define LDAP_DN_MAYESCAPE(c) \ - ( LDAP_DN_ESCAPE(c) || LDAP_DN_NE(c) \ - || LDAP_DN_ASCII_SPACE(c) || LDAP_DN_OCTOTHORPE(c) ) -#define LDAP_DN_SHOULDESCAPE(c) ( 0 ) -#endif /* ! LDAP_DEVEL */ - + #define LDAP_DN_NEEDESCAPE(c) \ ( LDAP_DN_ESCAPE(c) || LDAP_DN_NE(c) ) #define LDAP_DN_NEEDESCAPE_LEAD(c) LDAP_DN_MAYESCAPE(c)