]> git.sur5r.net Git - openldap/commitdiff
import empty DN uniqueMember normalization from HEAD
authorPierangelo Masarati <ando@openldap.org>
Thu, 13 May 2004 22:58:00 +0000 (22:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 13 May 2004 22:58:00 +0000 (22:58 +0000)
CHANGES
servers/slapd/schema_init.c

diff --git a/CHANGES b/CHANGES
index e2b56870bdfb8f389765075944fadb04decd2bb7..1978fdf42b9d882a280e711da7558e45d0af26e8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.2 Change Log
 
 OpenLDAP 2.2.12 Engineering
+       Fixed slapd empty DN uniqueMember normalization
        Fixed slapd empty DN in proxyAuthx control
        Fixed slapd parsing of auth{cz} "dn:<pat>" rules
        Fixed slapd set acl recursion (ITS#3140)
index 62ed895884852420cba6214282f82a79691ea900..4f8bd63c685de92524b5096d1ebe7efe37038443 100644 (file)
@@ -873,8 +873,11 @@ uniqueMemberNormalize(
 
        assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage ));
 
-       ber_dupbv( &out, val );
-       if( out.bv_len != 0 ) {
+       ber_dupbv_x( &out, val, ctx );
+       if( BER_BVISEMPTY( &out ) ) {
+               *normalized = out;
+
+       } else {
                struct berval uid = BER_BVNULL;
 
                if( out.bv_val[out.bv_len-1] == 'B'
@@ -884,7 +887,7 @@ uniqueMemberNormalize(
                        uid.bv_val = strrchr( out.bv_val, '#' );
 
                        if( uid.bv_val == NULL ) {
-                               free( out.bv_val );
+                               sl_free( out.bv_val, ctx );
                                return LDAP_INVALID_SYNTAX;
                        }
 
@@ -898,7 +901,7 @@ uniqueMemberNormalize(
                rc = dnNormalize( 0, NULL, NULL, &out, normalized, ctx );
 
                if( rc != LDAP_SUCCESS ) {
-                       free( out.bv_val );
+                       sl_free( out.bv_val, ctx );
                        return LDAP_INVALID_SYNTAX;
                }
 
@@ -918,7 +921,7 @@ uniqueMemberNormalize(
                        normalized->bv_val[normalized->bv_len] = '\0';
                }
 
-               free( out.bv_val );
+               sl_free( out.bv_val, ctx );
        }
 
        return LDAP_SUCCESS;