From: Luke Howard Date: Sat, 6 Dec 2003 02:16:39 +0000 (+0000) Subject: Ensure exact DNs are normalized in slap_parseURI. X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~272 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=369b1515db436a6037b3dab7d9dd18b56c982a2a;p=openldap Ensure exact DNs are normalized in slap_parseURI. --- diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index 6ff7f7d768..c3d92ac4ab 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -136,9 +136,12 @@ is_dn_exact: bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val); is_dn: bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val); - ber_dupbv_x( nbase, &bv, op->o_tmpmemctx ); - *scope = LDAP_X_SCOPE_EXACTREGEX; - return LDAP_SUCCESS; + rc = dnNormalize( 0, NULL, NULL, &bv, nbase, op->o_tmpmemctx ); + if( rc == LDAP_SUCCESS ) { + *scope = LDAP_X_SCOPE_EXACTREGEX; + } + + return( rc ); /* explicitly set to regex: it will be regcomp'd/regexec'd */ } else if ( !strncasecmp( uri->bv_val, "dn.regex:", sizeof("dn.regex:")-1 ) ) {