...
 
Commits (6)
......@@ -7,6 +7,8 @@ OpenLDAP 2.4.54 Engineering
Fixed slapd syncrepl to be fully serialized (ITS#8102)
Fixed slapd syncrepl to call check_syncprov on fresh consumer (ITS#9345)
Fixed slapd syncrepl to propagate errors from overlay_entry_get_ov (ITS#9355)
Fixed slapd syncrepl to not create empty ADD ops (ITS#9359)
Fixed slapd syncrepl replace usage on single valued attrs (ITS#9295)
Fixed slapd-monitor fix monitor_back_register_database for empty suffix DB (ITS#9353)
Fixed slapo-accesslog normalizer for reqStart (ITS#9358)
Fixed slapo-syncprov contextCSN generation with empty suffix (ITS#9015)
......
......@@ -1956,8 +1956,6 @@ syncrepl_accesslog_mods(
if ( !mod || ad != mod->sml_desc || op != mod->sml_op ) {
mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
if ( op == LDAP_MOD_ADD && is_at_single_value( ad->ad_type ))
op = LDAP_MOD_REPLACE;
mod->sml_flags = 0;
mod->sml_op = op;
mod->sml_next = NULL;
......@@ -1967,6 +1965,10 @@ syncrepl_accesslog_mods(
mod->sml_nvalues = NULL;
mod->sml_numvals = 0;
/* Keep 'op' to reflect what we read out from accesslog */
if ( op == LDAP_MOD_ADD && is_at_single_value( ad->ad_type ))
mod->sml_op = LDAP_MOD_REPLACE;
*modtail = mod;
modtail = &mod->sml_next;
}
......@@ -2011,7 +2013,10 @@ static Modifications *mods_dup( Operation *op, Modifications *modlist, int match
modlist->sml_desc == slap_schema.si_ad_modifyTimestamp ||
modlist->sml_desc == slap_schema.si_ad_entryCSN )
continue;
if ( modlist->sml_op == LDAP_MOD_REPLACE ) {
if ( modlist->sml_values == NULL && modlist->sml_op == LDAP_MOD_REPLACE ) {
/* ITS#9359 This adds no values, just change to a delete op */
modlist->sml_op = LDAP_MOD_DELETE;
} else if ( modlist->sml_op == LDAP_MOD_REPLACE ) {
mod = op->o_tmpalloc( sizeof(Modifications), op->o_tmpmemctx );
mod->sml_desc = modlist->sml_desc;
mod->sml_values = NULL;
......@@ -2598,11 +2603,30 @@ syncrepl_message_to_op(
"mods2entry (%s)\n",
si->si_ridtxt, text, 0 );
} else {
rc = op->o_bd->be_add( op, &rs );
Debug( LDAP_DEBUG_SYNC,
"syncrepl_message_to_op: %s be_add %s (%d)\n",
si->si_ridtxt, op->o_req_dn.bv_val, rc );
do_graduate = 0;
rc = CV_CSN_OK;
if ( do_lock ) {
/* do_lock is only true because we didn't get a cookieCSN and
* therefore didn't already lock the pending list. See if the
* entryCSN is fresh enough. Ignore this op if too old.
*/
Attribute *a = attr_find( e->e_attrs, slap_schema.si_ad_entryCSN );
if ( a ) {
int sid = slap_parse_csn_sid( &a->a_nvals[0] );
ldap_pvt_thread_mutex_lock( &si->si_cookieState->cs_mutex );
rc = check_csn_age( si, &op->o_req_dn, &a->a_nvals[0],
sid, (cookie_vals *)&si->si_cookieState->cs_vals, NULL );
ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex );
}
}
if ( rc == CV_CSN_OLD ) {
rc = LDAP_SUCCESS;
} else {
rc = op->o_bd->be_add( op, &rs );
Debug( LDAP_DEBUG_SYNC,
"syncrepl_message_to_op: %s be_add %s (%d)\n",
si->si_ridtxt, op->o_req_dn.bv_val, rc );
do_graduate = 0;
}
}
if ( e == op->ora_e )
be_entry_release_w( op, op->ora_e );
......
......@@ -390,6 +390,8 @@ $LDAPMODIFY -D "$MANAGERDN" -H $URI2 -w $PASSWD \
>> $TESTOUT 2>&1 << EOF
dn: $THEDN
changetype: modify
replace: employeetype
-
add: description
description: Stupendous
......