if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
-
goto cleanup;
}
op->o_bd = frontendDB;
rs->sr_err = frontendDB->be_modify( op, rs );
+#ifdef LDAP_X_TXN
+ if( rs->sr_err == LDAP_X_TXN_SPECIFY_OKAY ) {
+ /* skip cleanup */
+ return rs->sr_err;
+ }
+#endif
+
cleanup:
op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
Statslog( LDAP_DEBUG_STATS, "%s MOD attr=%s\n",
op->o_log_prefix, abuf, 0, 0, 0 );
- len = 0;
+ len = 0;
ptr = abuf;
if( 1 + tmp->sml_type.bv_len > sizeof(abuf)) {
/* do the update here */
int repl_user = be_isupdate( op );
- /* Multimaster slapd does not have to check for replicator dn
+ /*
+ * Multimaster slapd does not have to check for replicator dn
* because it accepts each modify request
*/
-#ifndef SLAPD_MULTIMASTER
- if ( !SLAP_SHADOW(op->o_bd) || repl_user )
-#endif /* ! SLAPD_MULTIMASTER */
- {
- int update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn );
- slap_callback cb = { NULL, slap_replog_cb, NULL, NULL };
+ if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) {
+ int update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn );
+ slap_callback cb = { NULL, slap_replog_cb, NULL, NULL };
op->o_bd = op_be;
}
}
-#ifdef SLAPD_MULTIMASTER
- if ( !repl_user )
-#endif /* SLAPD_MULTIMASTER */
- {
+ if ( !repl_user ) {
/* but multimaster slapd logs only the ones
* not from a replicator user */
cb.sc_next = op->o_callback;
}
op->o_bd->be_modify( op, rs );
-#ifndef SLAPD_MULTIMASTER
- /* send a referral */
- } else {
+ } else { /* send a referral */
BerVarray defref = op->o_bd->be_update_refs
? op->o_bd->be_update_refs : default_referral;
if ( defref != NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"shadow context; no update referral" );
}
-#endif /* ! SLAPD_MULTIMASTER */
}
+
} else {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"operation not supported within namingContext" );
char *textbuf,
size_t textlen )
{
- if( get_manageDIT( op ) ) return LDAP_SUCCESS;
+ if( get_relax( op ) ) return LDAP_SUCCESS;
for ( ; ml != NULL; ml = ml->sml_next ) {
if ( is_at_obsolete( ml->sml_desc->ad_type ) &&
continue;
}
- if ( get_manageDIT( op ) ) {
+ if ( get_relax( op ) ) {
if ( ml->sml_desc->ad_type->sat_flags & SLAP_AT_MANAGEABLE ) {
ml->sml_flags |= SLAP_MOD_MANAGING;
continue;
struct berval pval;
if ( pretty ) {
-#ifdef SLAP_ORDERED_PRETTYNORM
rc = ordered_value_pretty( ad,
&ml->sml_values[nvals], &pval, ctx );
-#else /* ! SLAP_ORDERED_PRETTYNORM */
- rc = pretty( ad->ad_type->sat_syntax,
- &ml->sml_values[nvals], &pval, ctx );
-#endif /* ! SLAP_ORDERED_PRETTYNORM */
} else {
-#ifdef SLAP_ORDERED_PRETTYNORM
rc = ordered_value_validate( ad,
&ml->sml_values[nvals], ml->sml_op );
-#else /* ! SLAP_ORDERED_PRETTYNORM */
- rc = validate( ad->ad_type->sat_syntax,
- &ml->sml_values[nvals] );
-#endif /* ! SLAP_ORDERED_PRETTYNORM */
}
if( rc != 0 ) {
(nvals+1)*sizeof(struct berval), ctx );
for ( nvals = 0; !BER_BVISNULL( &ml->sml_values[nvals] ); nvals++ ) {
-#ifdef SLAP_ORDERED_PRETTYNORM
rc = ordered_value_normalize(
SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
ad,
ad->ad_type->sat_equality,
&ml->sml_values[nvals], &ml->sml_nvalues[nvals], ctx );
-#else /* ! SLAP_ORDERED_PRETTYNORM */
- rc = ad->ad_type->sat_equality->smr_normalize(
- SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
- ad->ad_type->sat_syntax,
- ad->ad_type->sat_equality,
- &ml->sml_values[nvals], &ml->sml_nvalues[nvals], ctx );
-#endif /* ! SLAP_ORDERED_PRETTYNORM */
if ( rc ) {
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (ssyn_normalize %d)\n",