andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0061-Ticket-49541-Replica-ID-config-validation-fix.patch

081b2d
From d39be97021f273548957a9f26ca35d5faab20318 Mon Sep 17 00:00:00 2001
081b2d
From: Mark Reynolds <mreynolds@redhat.com>
081b2d
Date: Mon, 29 Jan 2018 21:13:16 -0500
081b2d
Subject: [PATCH] Ticket 49541 - Replica ID config validation fix
081b2d
081b2d
Description:  Is is possible to set the replica ID to 65535 with a modify
081b2d
              operation, which is reserved for hubs/consumers.
081b2d
081b2d
https://pagure.io/389-ds-base/issue/49541
081b2d
081b2d
Reviewed by: mreynolds (one line commit rule)
081b2d
---
081b2d
 ldap/servers/plugins/replication/repl5_replica_config.c | 2 +-
081b2d
 1 file changed, 1 insertion(+), 1 deletion(-)
081b2d
081b2d
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
081b2d
index bda333362..ea430d9a4 100644
081b2d
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
081b2d
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
081b2d
@@ -421,7 +421,7 @@ replica_config_modify(Slapi_PBlock *pb,
081b2d
                     }
081b2d
                 } else if (strcasecmp(config_attr, attr_replicaId) == 0) {
081b2d
                     int64_t rid = 0;
081b2d
-                    if (repl_config_valid_num(config_attr, config_attr_value, 1, 65535, returncode, errortext, &rid) == 0) {
081b2d
+                    if (repl_config_valid_num(config_attr, config_attr_value, 1, 65534, returncode, errortext, &rid) == 0) {
081b2d
                         slapi_ch_free_string(&new_repl_id);
081b2d
                         new_repl_id = slapi_ch_strdup(config_attr_value);
081b2d
                     } else {
081b2d
-- 
081b2d
2.13.6
081b2d