- reg = &( SaslRegexp[nSaslRegexp] );
- ber_str2bv( match, 0, 0, &bv );
- reg->sr_match = bv.bv_val;
-
- ber_str2bv( replace, 0, 0, &bv );
- rc = slap_parseURI( &bv, ®->sr_replace.dn, ®->sr_replace.scope,
- &filter, ®->sr_replace.filter );
- if ( filter ) filter_free( filter );
- if ( rc ) {
-#ifdef NEW_LOGGING
- LDAP_LOG( TRANSPORT, ERR,
- "slap_sasl_regexp_config: \"%s\" could not be parsed.\n",
- replace, 0, 0 );
-#else
- Debug( LDAP_DEBUG_ANY,
- "SASL replace pattern %s could not be parsed.\n",
- replace, 0, 0 );
-#endif
- return( rc );
- }
+
+ reg = &SaslRegexp[nSaslRegexp];
+
+ reg->sr_match = ch_strdup( match );
+ reg->sr_replace = ch_strdup( replace );