1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 43d5ac680f7781f95205db94e5ff2958d39b78a4
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Tue Jun 14 17:19:48 2016 -0400
Ticket 48636 - Fix config validation check
Bug Description: We were previous checking if an unsigfned int was less than zero
Fix Description: Improve config validation by using long instead of PRUint64
https://fedorahosted.org/389/ticket/48636
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 3f6bc9b..7655ac4 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -601,17 +601,20 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
{
if (apply_mods)
{
- PRUint64 val = atoll(config_attr_value);
+ long val = atol(config_attr_value);
- if(val < 0){
+ if (val < 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a number zero or greater.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ "replica_config_modify: %s\n", errortext);
break;
+ } else {
+ /* Set the timeout */
+ replica_set_release_timeout(r, val);
}
- replica_set_release_timeout(r, val);
}
}
else
--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org
No comments:
Post a Comment