}
#ifdef ENABLE_REWRITE
- if ( mdn != dn ) {
+ if ( mdn != dn->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mdn );
#ifdef ENABLE_REWRITE
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
AttributeAssertion *ava
)
{
* Rewrite the compare dn, if needed
*/
#ifdef ENABLE_REWRITE
- switch ( rewrite_session( li->rwinfo, "compareDn", dn, conn, &mdn ) ) {
+ switch ( rewrite_session( li->rwinfo, "compareDn", dn->bv_val, conn, &mdn ) ) {
case REWRITE_REGEXEC_OK:
if ( mdn == NULL ) {
- mdn = ( char * )dn;
+ mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"[rw] compareDn: \"%s\" -> \"%s\"\n",
- dn, mdn ));
+ dn->bv_val, mdn ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> compareDn: \"%s\" -> \"%s\"\n%s",
- dn, mdn, "" );
+ dn->bv_val, mdn, "" );
#endif /* !NEW_LOGGING */
break;
return( -1 );
}
#else /* !ENABLE_REWRITE */
- mdn = ldap_back_dn_massage( li, ch_strdup( dn ), 0 );
+ mdn = ldap_back_dn_massage( li, ch_strdup( dn->bv_val ), 0 );
if ( mdn == NULL ) {
return -1;
}
ldap_compare_s( lc->ld, mdn, mapped_oc, mapped_at );
#ifdef ENABLE_REWRITE
- if ( mdn != dn ) {
+ if ( mdn != dn->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mdn );
#ifdef ENABLE_REWRITE
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn
+ struct berval *dn,
+ struct berval *ndn
)
{
struct ldapinfo *li = (struct ldapinfo *) be->be_private;
* Rewrite the compare dn, if needed
*/
#ifdef ENABLE_REWRITE
- switch ( rewrite_session( li->rwinfo, "deleteDn", dn, conn, &mdn ) ) {
+ switch ( rewrite_session( li->rwinfo, "deleteDn", dn->bv_val, conn, &mdn ) ) {
case REWRITE_REGEXEC_OK:
if ( mdn == NULL ) {
- mdn = ( char * )dn;
+ mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] deleteDn: \"%s\" -> \"%s\"\n", dn, mdn ));
+ "[rw] deleteDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> deleteDn: \"%s\" -> \"%s\"\n%s",
- dn, mdn, "" );
+ dn->bv_val, mdn, "" );
#endif /* !NEW_LOGGING */
break;
return( -1 );
}
#else /* !ENABLE_REWRITE */
- mdn = ldap_back_dn_massage( li, ch_strdup( dn ), 0 );
+ mdn = ldap_back_dn_massage( li, ch_strdup( dn->bv_val ), 0 );
#endif /* !ENABLE_REWRITE */
ldap_delete_s( lc->ld, mdn );
#ifdef ENABLE_REWRITE
- if ( mdn != dn ) {
+ if ( mdn != dn->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mdn );
#ifdef ENABLE_REWRITE
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
+ struct berval *dn,
+ struct berval *ndn,
Modifications *modlist
)
{
* Rewrite the modify dn, if needed
*/
#ifdef ENABLE_REWRITE
- switch ( rewrite_session( li->rwinfo, "modifyDn", dn, conn, &mdn ) ) {
+ switch ( rewrite_session( li->rwinfo, "modifyDn", dn->bv_val, conn, &mdn ) ) {
case REWRITE_REGEXEC_OK:
if ( mdn == NULL ) {
- mdn = ( char * )dn;
+ mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modifyDn: \"%s\" -> \"%s\"\n", dn, mdn ));
+ "[rw] modifyDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modifyDn: \"%s\" -> \"%s\"\n%s",
- dn, mdn, "" );
+ dn->bv_val, mdn, "" );
#endif /* !NEW_LOGGING */
break;
return( -1 );
}
#else /* !ENABLE_REWRITE */
- mdn = ldap_back_dn_massage( li, ch_strdup( dn ), 0 );
+ mdn = ldap_back_dn_massage( li, ch_strdup( dn->bv_val ), 0 );
#endif /* !ENABLE_REWRITE */
for (i=0, ml=modlist; ml; i++,ml=ml->sml_next)
cleanup:;
#ifdef ENABLE_REWRITE
- if ( mdn != dn ) {
+ if ( mdn != dn->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mdn );
#ifdef ENABLE_REWRITE
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- const char *newrdn,
+ struct berval *dn,
+ struct berval *ndn,
+ struct berval *newrdn,
+ struct berval *nnewrdn,
int deleteoldrdn,
- const char *newSuperior
+ struct berval *newSuperior,
+ struct berval *nnewSuperior
)
{
struct ldapinfo *li = (struct ldapinfo *) be->be_private;
*/
#ifdef ENABLE_REWRITE
switch ( rewrite_session( li->rwinfo, "newSuperiorDn",
- newSuperior, conn, &mnewSuperior ) ) {
+ newSuperior->bv_val, conn, &mnewSuperior ) ) {
case REWRITE_REGEXEC_OK:
if ( mnewSuperior == NULL ) {
mnewSuperior = ( char * )newSuperior;
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> newSuperiorDn:"
" \"%s\" -> \"%s\"\n%s",
- newSuperior, mnewSuperior, "" );
+ newSuperior->bv_val, mnewSuperior, "" );
#endif /* !NEW_LOGGING */
break;
}
#else /* !ENABLE_REWRITE */
mnewSuperior = ldap_back_dn_massage( li,
- ch_strdup( newSuperior ), 0 );
+ ch_strdup( newSuperior->bv_val ), 0 );
if ( mnewSuperior == NULL ) {
return( -1 );
}
/*
* Rewrite the modrdn dn, if required
*/
- switch ( rewrite_session( li->rwinfo, "modrDn", dn, conn, &mdn ) ) {
+ switch ( rewrite_session( li->rwinfo, "modrDn", dn->bv_val, conn, &mdn ) ) {
case REWRITE_REGEXEC_OK:
if ( mdn == NULL ) {
- mdn = ( char * )dn;
+ mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modrDn: \"%s\" -> \"%s\"\n", dn, mdn ));
+ "[rw] modrDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modrDn: \"%s\" -> \"%s\"\n%s",
- dn, mdn, "" );
+ dn->bv_val, mdn, "" );
#endif /* !NEW_LOGGING */
break;
return( -1 );
}
#else /* !ENABLE_REWRITE */
- mdn = ldap_back_dn_massage( li, ch_strdup( dn ), 0 );
+ mdn = ldap_back_dn_massage( li, ch_strdup( dn->bv_val ), 0 );
#endif /* !ENABLE_REWRITE */
- ldap_rename2_s( lc->ld, mdn, newrdn, mnewSuperior, deleteoldrdn );
+ ldap_rename2_s( lc->ld, mdn, newrdn->bv_val, mnewSuperior, deleteoldrdn );
#ifdef ENABLE_REWRITE
- if ( mdn != dn ) {
+ if ( mdn != dn->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mdn );
#ifdef ENABLE_REWRITE
#endif /* ENABLE_REWRITE */
if ( mnewSuperior != NULL
#ifdef ENABLE_REWRITE
- && mnewSuperior != newSuperior
+ && mnewSuperior != newSuperior->bv_val
#endif /* ENABLE_REWRITE */
) {
free( mnewSuperior );
Backend *be,
Connection *conn,
Operation *op,
- const char *base,
- const char *nbase,
+ struct berval *base,
+ struct berval *nbase,
int scope,
int deref,
int slimit,
*/
#ifdef ENABLE_REWRITE
switch ( rewrite_session( li->rwinfo, "searchBase",
- base, conn, &mbase ) ) {
+ base->bv_val, conn, &mbase ) ) {
case REWRITE_REGEXEC_OK:
if ( mbase == NULL ) {
- mbase = ( char * )base;
+ mbase = ( char * )base->bv_val;
}
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"[rw] searchBase: \"%s\" -> \"%s\"\n%",
- base, mbase ));
+ base->bv_val, mbase ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" -> \"%s\"\n%s",
- base, mbase, "" );
+ base->bv_val, mbase, "" );
#endif /* !NEW_LOGGING */
break;
goto finish;
}
#else /* !ENABLE_REWRITE */
- mbase = ldap_back_dn_massage( li, ch_strdup( base ), 0 );
+ mbase = ldap_back_dn_massage( li, ch_strdup( base->bv_val ), 0 );
#endif /* !ENABLE_REWRITE */
mapped_filter = ldap_back_map_filter(&li->at_map, &li->oc_map,
#endif /* !ENABLE_REWRITE */
#ifdef ENABLE_REWRITE
- if ( mbase != base ) {
+ if ( mbase != base->bv_val ) {
#endif /* ENABLE_REWRITE */
free( mbase );
#ifdef ENABLE_REWRITE