From 39e63c588bc4c39ef73f930f3d1b4fe0a18b7412 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Fri, 16 Aug 2013 16:36:04 -0700 Subject: [PATCH] Ticket #609 - nsDS5BeginReplicaRefresh attribute accepts any value and it doesn't throw any error when server restarts. Bug description: If an invalid value is set to ds5BeginReplicaRefresh in an agreement, it does not affect the behaviour, but it does not get purged from the agreement and causes an error if "ds5BeginReplicaRefresh: start" is added. Fix description: Adding an invalid ds5BeginReplicaRefresh is rejected with "DSA is unwilling to perform" and the following error is returned: ldap_modify: additional info: Invalid value (junk_value123) value supplied for attr (nsds5BeginReplicaRefresh); Ignoring ... --- ldap/servers/plugins/replication/repl5_agmtlist.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c index 1167b0c..e4ef66b 100644 --- a/ldap/servers/plugins/replication/repl5_agmtlist.c +++ b/ldap/servers/plugins/replication/repl5_agmtlist.c @@ -275,7 +275,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry break; } - /* Start replica initialization */ + /* Start replica initialization */ if (val == NULL) { PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "No value supplied for attr (%s)", mods[i]->mod_type); @@ -300,9 +300,12 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry } else { - PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value (%s) value supplied for attr (%s)", - val, mods[i]->mod_type); + PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, + "Invalid value (%s) value supplied for attr (%s); Ignoring ...", + val, mods[i]->mod_type); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback: %s\n", errortext); + *returncode = LDAP_UNWILLING_TO_PERFORM; + rc = SLAPI_DSE_CALLBACK_ERROR; } slapi_ch_free ((void**)&val); } -- 1.8.1.4