mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
assert( mod->sml_values[0].bv_val );
- mod->sml_nvalues = NULL;
+ mod->sml_nvalues =
+ (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
+ (*mod->sml_desc->ad_type->sat_equality->smr_normalize)(
+ SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+ mod->sml_desc->ad_type->sat_syntax,
+ mod->sml_desc->ad_type->sat_equality,
+ mod->sml_values, mod->sml_nvalues, NULL );
+ mod->sml_nvalues[1].bv_len = 0;
+ mod->sml_nvalues[1].bv_val = NULL;
*modtail = mod;
modtail = &mod->sml_next;
AttributeAssertion ava = {0};
int rc = LDAP_SUCCESS;
int ret = LDAP_SUCCESS;
+ const char *text;
if ( refresh &&
( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_ADD ))
return e ? 1 : 0;
}
+ f.f_choice = LDAP_FILTER_EQUALITY;
+ f.f_ava = &ava;
+ ava.aa_desc = slap_schema.si_ad_entryUUID;
+ rc = asserted_value_validate_normalize(
+ ava.aa_desc, ad_mr(ava.aa_desc, SLAP_MR_EQUALITY),
+ SLAP_MR_EQUALITY, syncUUID, &ava.aa_value, &text, op->o_tmpmemctx );
+ if ( rc != LDAP_SUCCESS ) {
+ return rc;
+ }
+ op->ors_filter = &f;
+
op->ors_filterstr.bv_len = (sizeof("entryUUID=")-1) + syncUUID->bv_len;
op->ors_filterstr.bv_val = (char *) sl_malloc(
op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
syncUUID->bv_val, syncUUID->bv_len );
op->ors_filterstr.bv_val[op->ors_filterstr.bv_len] = '\0';
- f.f_choice = LDAP_FILTER_EQUALITY;
- f.f_ava = &ava;
- ava.aa_desc = slap_schema.si_ad_entryUUID;
- ava.aa_value = *syncUUID;
- op->ors_filter = &f;
op->ors_scope = LDAP_SCOPE_SUBTREE;
/* get syncrepl cookie of shadow replica from subentry */
rc == LDAP_NO_SUCH_OBJECT )
{
attr_delete( &e->e_attrs, slap_schema.si_ad_entryUUID );
- attr_merge_normalize_one( e, slap_schema.si_ad_entryUUID,
- syncUUID, op->o_tmpmemctx );
+ attr_merge_one( e, slap_schema.si_ad_entryUUID,
+ syncUUID, &ava.aa_value );
op->o_tag = LDAP_REQ_ADD;
op->ora_e = e;
done :
+ if ( ava.aa_value.bv_val ) {
+ ber_memfree_x( ava.aa_value.bv_val, op->o_tmpmemctx );
+ }
if ( si->si_syncUUID_ndn.bv_val ) {
ber_memfree_x( si->si_syncUUID_ndn.bv_val, op->o_tmpmemctx );
}