ldap/servers/plugins/replication/repl5_agmtlist.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit b6b8d7bbda8b4fb0cf9e18011111e28f43e86cbd
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Aug 16 16:36:04 2013 -0700
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 ...
Reviewed by Rich (Thank you!!)
https://fedorahosted.org/389/ticket/609
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);
}