-
- return( ldap_back_op_result( lc, op ) );
-}
-
-#ifdef ENABLE_REWRITE
-int
-ldap_dnattr_rewrite(
- struct rewrite_info *rwinfo,
- struct berval **a_vals,
- void *cookie
-)
-{
- int j;
- char *mattr;
-
- for ( j = 0; a_vals[ j ] != NULL; j++ ) {
- switch ( rewrite_session( rwinfo, "bindDn", a_vals[ j ]->bv_val,
- cookie, &mattr )) {
- case REWRITE_REGEXEC_OK:
- if ( mattr == NULL ) {
- /* no substitution */
- continue;
- }
-#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn (in add of dn-valued"
- " attr): \"%s\" -> \"%s\"\n",
- a_vals[ j ]->bv_val, mattr ));
-#else /* !NEW_LOGGING */
- Debug( LDAP_DEBUG_ARGS,
- "rw> bindDn (in add of dn-valued attr):"
- " \"%s\" -> \"%s\"\n%s",
- a_vals[ j ]->bv_val, mattr, "" );
-#endif /* !NEW_LOGGING */
-
- free( a_vals[ j ]->bv_val );
- a_vals[ j ]->bv_val = mattr;
- a_vals[ j ]->bv_len = strlen( mattr );
-
- break;
-
- case REWRITE_REGEXEC_UNWILLING:
-
- case REWRITE_REGEXEC_ERR:
- /*
- * FIXME: better give up,
- * skip the attribute
- * or leave it untouched?
- */
- break;
- }