This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch 389-ds-base-1.3.7 in repository 389-ds-base.
from 400e6eb Ticket 49370 - Add all the password policy defaults to a new local policy new 2cabb08 Ticket 49541 - repl config should not allow rid 65535 for masters
The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: dirsrvtests/tests/suites/replication/replica_config_test.py | 9 +++++---- ldap/servers/plugins/replication/repl5_replica.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.7 in repository 389-ds-base.
commit 2cabb0894246c7e788e72522c6996d87ca84ebe2 Author: Mark Reynolds mreynolds@redhat.com Date: Thu Jan 18 13:17:08 2018 -0500
Ticket 49541 - repl config should not allow rid 65535 for masters
Description: Reject adding a replica config entry with a rid of 65535 or higher, and prevent setting master's rid to 65535 or higher.
https://pagure.io/389-ds-base/issue/49541
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit ebb00a4180693225cf3c2f4aced54dc33141fa77) --- dirsrvtests/tests/suites/replication/replica_config_test.py | 9 +++++---- ldap/servers/plugins/replication/repl5_replica.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dirsrvtests/tests/suites/replication/replica_config_test.py b/dirsrvtests/tests/suites/replication/replica_config_test.py index 50ea2ec..143a124 100644 --- a/dirsrvtests/tests/suites/replication/replica_config_test.py +++ b/dirsrvtests/tests/suites/replication/replica_config_test.py @@ -24,7 +24,7 @@ replica_dict = {'objectclass': 'top nsDS5Replica'.split(), 'nsDS5ReplicaRoot': 'dc=example,dc=com', 'nsDS5ReplicaType': '3', 'nsDS5Flags': '1', - 'nsDS5ReplicaId': '65535', + 'nsDS5ReplicaId': '65534', 'nsds5ReplicaPurgeDelay': '604800', 'nsDS5ReplicaBindDN': 'cn=u', 'cn': 'replica'} @@ -42,7 +42,7 @@ agmt_dict = {'objectClass': 'top nsDS5ReplicationAgreement'.split(),
repl_add_attrs = [('nsDS5ReplicaType', '-1', '4', overflow, notnum, '1'), ('nsDS5Flags', '-1', '2', overflow, notnum, '1'), - ('nsDS5ReplicaId', '0', '65536', overflow, notnum, '1'), + ('nsDS5ReplicaId', '0', '65535', overflow, notnum, '1'), ('nsds5ReplicaPurgeDelay', '-2', too_big, overflow, notnum, '1'), ('nsDS5ReplicaBindDnGroupCheckInterval', '-2', too_big, overflow, notnum, '1'), ('nsds5ReplicaTombstonePurgeInterval', '-2', too_big, overflow, notnum, '1'), @@ -60,7 +60,8 @@ repl_mod_attrs = [('nsDS5Flags', '-1', '2', overflow, notnum, '1'), ('nsds5ReplicaBackoffMin', '0', too_big, overflow, notnum, '3'), ('nsds5ReplicaBackoffMax', '0', too_big, overflow, notnum, '6')]
-agmt_attrs = [('nsds5ReplicaPort', '0', '65536', overflow, notnum, '389'), +agmt_attrs = [ + ('nsds5ReplicaPort', '0', '65535', overflow, notnum, '389'), ('nsds5ReplicaTimeout', '-1', too_big, overflow, notnum, '6'), ('nsds5ReplicaBusyWaitTime', '-1', too_big, overflow, notnum, '6'), ('nsds5ReplicaSessionPauseTime', '-1', too_big, overflow, notnum, '6'), @@ -393,5 +394,5 @@ if __name__ == '__main__': # Run isolated # -s for DEBUG mode CURRENT_FILE = os.path.realpath(__file__) - pytest.main("-s %s" % CURRENT_FILE) + pytest.main(["-s", CURRENT_FILE])
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c index f026773..a629658 100644 --- a/ldap/servers/plugins/replication/repl5_replica.c +++ b/ldap/servers/plugins/replication/repl5_replica.c @@ -1988,7 +1988,7 @@ _replica_init_from_config(Replica *r, Slapi_Entry *e, char *errortext) r->repl_type == REPLICA_TYPE_PRIMARY) { if ((val = slapi_entry_attr_get_charptr(e, attr_replicaId))) { int64_t rid; - if (repl_config_valid_num(attr_replicaId, val, 1, 65535, &rc, errormsg, &rid) != 0) { + if (repl_config_valid_num(attr_replicaId, val, 1, 65534, &rc, errormsg, &rid) != 0) { slapi_ch_free_string(&val); return -1; }
389-commits@lists.fedoraproject.org