This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 419b56a Issue 50919 - Backend delete fails using dsconf
419b56a is described below
commit 419b56a5209e99228574c221b6f482ac4c861e9f
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Feb 28 08:06:17 2020 -0500
Issue 50919 - Backend delete fails using dsconf
Description: Fix typo in parser argument name
relates: https://pagure.io/389-ds-base/issue/50919
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit 5fb047137d4079e81baf795d9fdc26f572ec5bf1)
---
src/lib389/lib389/cli_conf/backend.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/backend.py b/src/lib389/lib389/cli_conf/backend.py
index aaa6613..10208bd 100644
--- a/src/lib389/lib389/cli_conf/backend.py
+++ b/src/lib389/lib389/cli_conf/backend.py
@@ -286,7 +286,7 @@ def is_db_link(inst, rdn):
if cn == rdn.lower():
return True
return False
-
+
def is_db_replicated(inst, suffix):
replicas = Replicas(inst)
@@ -381,7 +381,7 @@ def backend_build_tree(inst, be_insts, nodes):
if be_suffix == node_suffix.lower():
# We have our parent, now find the children
mts = be._mts.list()
-
+
for mt in mts:
sub_parent = mt.get_attr_val_utf8_l('nsslapd-parent-suffix')
sub_be = mt.get_attr_val_utf8_l('nsslapd-backend')
@@ -1111,7 +1111,7 @@ def create_parser(subparsers):
#######################################################
delete_parser = subcommands.add_parser('delete', help='Delete a backend database')
delete_parser.set_defaults(func=backend_delete)
- delete_parser.add_argument('be-name', help='The backend name or suffix to delete')
+ delete_parser.add_argument('be_name', help='The backend name or suffix to delete')
#######################################################
# Get Suffix Tree (for use in web console)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 1d03ec3 Issue 50919 - Backend delete fails using dsconf
1d03ec3 is described below
commit 1d03ec39406528721adfeeb5c901f43b2cafae1f
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Feb 28 08:06:17 2020 -0500
Issue 50919 - Backend delete fails using dsconf
Description: Fix typo in parser argument name
relates: https://pagure.io/389-ds-base/issue/50919
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit 5fb047137d4079e81baf795d9fdc26f572ec5bf1)
---
src/lib389/lib389/cli_conf/backend.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/backend.py b/src/lib389/lib389/cli_conf/backend.py
index aaa6613..10208bd 100644
--- a/src/lib389/lib389/cli_conf/backend.py
+++ b/src/lib389/lib389/cli_conf/backend.py
@@ -286,7 +286,7 @@ def is_db_link(inst, rdn):
if cn == rdn.lower():
return True
return False
-
+
def is_db_replicated(inst, suffix):
replicas = Replicas(inst)
@@ -381,7 +381,7 @@ def backend_build_tree(inst, be_insts, nodes):
if be_suffix == node_suffix.lower():
# We have our parent, now find the children
mts = be._mts.list()
-
+
for mt in mts:
sub_parent = mt.get_attr_val_utf8_l('nsslapd-parent-suffix')
sub_be = mt.get_attr_val_utf8_l('nsslapd-backend')
@@ -1111,7 +1111,7 @@ def create_parser(subparsers):
#######################################################
delete_parser = subcommands.add_parser('delete', help='Delete a backend database')
delete_parser.set_defaults(func=backend_delete)
- delete_parser.add_argument('be-name', help='The backend name or suffix to delete')
+ delete_parser.add_argument('be_name', help='The backend name or suffix to delete')
#######################################################
# Get Suffix Tree (for use in web console)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 5fb0471 Issue 50919 - Backend delete fails using dsconf
5fb0471 is described below
commit 5fb047137d4079e81baf795d9fdc26f572ec5bf1
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Feb 28 08:06:17 2020 -0500
Issue 50919 - Backend delete fails using dsconf
Description: Fix typo in parser argument name
relates: https://pagure.io/389-ds-base/issue/50919
Reviewed by: mreynolds(one line commit rule)
---
src/lib389/lib389/cli_conf/backend.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/backend.py b/src/lib389/lib389/cli_conf/backend.py
index aaa6613..10208bd 100644
--- a/src/lib389/lib389/cli_conf/backend.py
+++ b/src/lib389/lib389/cli_conf/backend.py
@@ -286,7 +286,7 @@ def is_db_link(inst, rdn):
if cn == rdn.lower():
return True
return False
-
+
def is_db_replicated(inst, suffix):
replicas = Replicas(inst)
@@ -381,7 +381,7 @@ def backend_build_tree(inst, be_insts, nodes):
if be_suffix == node_suffix.lower():
# We have our parent, now find the children
mts = be._mts.list()
-
+
for mt in mts:
sub_parent = mt.get_attr_val_utf8_l('nsslapd-parent-suffix')
sub_be = mt.get_attr_val_utf8_l('nsslapd-backend')
@@ -1111,7 +1111,7 @@ def create_parser(subparsers):
#######################################################
delete_parser = subcommands.add_parser('delete', help='Delete a backend database')
delete_parser.set_defaults(func=backend_delete)
- delete_parser.add_argument('be-name', help='The backend name or suffix to delete')
+ delete_parser.add_argument('be_name', help='The backend name or suffix to delete')
#######################################################
# Get Suffix Tree (for use in web console)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 265d4df Issue 50872 - dsconf can't create GSSAPI replication agreements
265d4df is described below
commit 265d4df730fbcd71a2bbe5de528ff461ba541c00
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Feb 27 15:01:40 2020 -0500
Issue 50872 - dsconf can't create GSSAPI replication agreements
Description: An error in python syntax broke the check for bind
method vs credentials.
Bug was found and fixed by: quentinmit (Thanks!)
relates: https://pagure.io/389-ds-base/issue/50872
Reviewed by: mreynolds
(cherry picked from commit 75a51aa395018d75b7feca38101cc89fa4627e1c)
---
src/lib389/lib389/cli_conf/replication.py | 2 +-
src/lib389/lib389/replica.py | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/replication.py b/src/lib389/lib389/cli_conf/replication.py
index 1c0c925..8e77c36 100644
--- a/src/lib389/lib389/cli_conf/replication.py
+++ b/src/lib389/lib389/cli_conf/replication.py
@@ -663,7 +663,7 @@ def add_agmt(inst, basedn, log, args):
properties['nsds5replicastripattrs'] = args.strip_list
# We do need the bind dn and credentials for none-sasl bind methods
- if (bind_method == 'simple' or 'sslclientauth') and (args.bind_dn is None or args.bind_passwd is None):
+ if (bind_method in ('simple', 'sslclientauth')) and (args.bind_dn is None or args.bind_passwd is None):
raise ValueError("You need to set the bind dn (--bind-dn) and the password (--bind-passwd) for bind method ({})".format(bind_method))
# Create the agmt
diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py
index 0fc1275..e3fc7fe 100644
--- a/src/lib389/lib389/replica.py
+++ b/src/lib389/lib389/replica.py
@@ -16,7 +16,6 @@ import logging
import uuid
import json
import copy
-from shutil import copyfile
from operator import itemgetter
from itertools import permutations
from lib389._constants import *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new dc339c4 Issue 50872 - dsconf can't create GSSAPI replication agreements
dc339c4 is described below
commit dc339c4cee04702991cfe9f2935723751708842e
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Feb 27 15:01:40 2020 -0500
Issue 50872 - dsconf can't create GSSAPI replication agreements
Description: An error in python syntax broke the check for bind
method vs credentials.
Bug was found and fixed by: quentinmit (Thanks!)
relates: https://pagure.io/389-ds-base/issue/50872
Reviewed by: mreynolds
(cherry picked from commit 75a51aa395018d75b7feca38101cc89fa4627e1c)
---
src/lib389/lib389/cli_conf/replication.py | 2 +-
src/lib389/lib389/replica.py | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/replication.py b/src/lib389/lib389/cli_conf/replication.py
index 1c0c925..8e77c36 100644
--- a/src/lib389/lib389/cli_conf/replication.py
+++ b/src/lib389/lib389/cli_conf/replication.py
@@ -663,7 +663,7 @@ def add_agmt(inst, basedn, log, args):
properties['nsds5replicastripattrs'] = args.strip_list
# We do need the bind dn and credentials for none-sasl bind methods
- if (bind_method == 'simple' or 'sslclientauth') and (args.bind_dn is None or args.bind_passwd is None):
+ if (bind_method in ('simple', 'sslclientauth')) and (args.bind_dn is None or args.bind_passwd is None):
raise ValueError("You need to set the bind dn (--bind-dn) and the password (--bind-passwd) for bind method ({})".format(bind_method))
# Create the agmt
diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py
index 0fc1275..e3fc7fe 100644
--- a/src/lib389/lib389/replica.py
+++ b/src/lib389/lib389/replica.py
@@ -16,7 +16,6 @@ import logging
import uuid
import json
import copy
-from shutil import copyfile
from operator import itemgetter
from itertools import permutations
from lib389._constants import *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 75a51aa Issue 50872 - dsconf can't create GSSAPI replication agreements
75a51aa is described below
commit 75a51aa395018d75b7feca38101cc89fa4627e1c
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Feb 27 15:01:40 2020 -0500
Issue 50872 - dsconf can't create GSSAPI replication agreements
Description: An error in python syntax broke the check for bind
method vs credentials.
Bug was found and fixed by: quentinmit (Thanks!)
relates: https://pagure.io/389-ds-base/issue/50872
Reviewed by: mreynolds
---
src/lib389/lib389/cli_conf/replication.py | 2 +-
src/lib389/lib389/replica.py | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/replication.py b/src/lib389/lib389/cli_conf/replication.py
index 1c0c925..8e77c36 100644
--- a/src/lib389/lib389/cli_conf/replication.py
+++ b/src/lib389/lib389/cli_conf/replication.py
@@ -663,7 +663,7 @@ def add_agmt(inst, basedn, log, args):
properties['nsds5replicastripattrs'] = args.strip_list
# We do need the bind dn and credentials for none-sasl bind methods
- if (bind_method == 'simple' or 'sslclientauth') and (args.bind_dn is None or args.bind_passwd is None):
+ if (bind_method in ('simple', 'sslclientauth')) and (args.bind_dn is None or args.bind_passwd is None):
raise ValueError("You need to set the bind dn (--bind-dn) and the password (--bind-passwd) for bind method ({})".format(bind_method))
# Create the agmt
diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py
index 0fc1275..e3fc7fe 100644
--- a/src/lib389/lib389/replica.py
+++ b/src/lib389/lib389/replica.py
@@ -16,7 +16,6 @@ import logging
import uuid
import json
import copy
-from shutil import copyfile
from operator import itemgetter
from itertools import permutations
from lib389._constants import *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch 389-ds-base-1.3.10
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.10 by this push:
new a587d4b Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
a587d4b is described below
commit a587d4bf61d93f716acedb57f4ae144a2a4237bd
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Wed Feb 26 14:35:26 2020 +0100
Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
Bug Description:
automember plugin adds matching members to a target group. If the target group
does not exist a message is logged but with SLAPI_LOG_PLUGIN level.
Fix Description:
Such situation (target group missing/deleted) is rare. It worths logging
the message, that automember did not add a member, at SLAPI_LOG_INFO
https://pagure.io/389-ds-base/pull-request/50285
Reviewed by: Mark Reynolds
Platforms tested: F30
Flag Day: no
Doc impact: no
---
ldap/servers/plugins/automember/automember.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 24fd874..813923d 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -1646,7 +1646,7 @@ automember_update_member_value(Slapi_Entry *member_e, const char *group_dn, char
if (rc != LDAP_SUCCESS || group_entry == NULL) {
if (rc == LDAP_NO_SUCH_OBJECT) {
/* the automember group (default or target) does not exist, just skip this definition */
- slapi_log_err(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_err(SLAPI_LOG_INFO, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_member_value - group (default or target) does not exist (%s)\n",
group_dn);
rc = 0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 3d8522b Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
3d8522b is described below
commit 3d8522bb81b6a17e437ca17621d76cef9ab4f1ee
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Wed Feb 26 14:35:26 2020 +0100
Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
Bug Description:
automember plugin adds matching members to a target group. If the target group
does not exist a message is logged but with SLAPI_LOG_PLUGIN level.
Fix Description:
Such situation (target group missing/deleted) is rare. It worths logging
the message, that automember did not add a member, at SLAPI_LOG_INFO
https://pagure.io/389-ds-base/pull-request/50285
Reviewed by: Mark Reynolds
Platforms tested: F30
Flag Day: no
Doc impact: no
---
.../suites/automember_plugin/automember_test.py | 46 ++++++++++++++++++++++
ldap/servers/plugins/automember/automember.c | 2 +-
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/dirsrvtests/tests/suites/automember_plugin/automember_test.py b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
index eda9950..b34747e 100644
--- a/dirsrvtests/tests/suites/automember_plugin/automember_test.py
+++ b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
@@ -140,6 +140,7 @@ def test_adduser(automember_fixture, topo):
assert group.is_member(user.dn)
user.delete()
+
@pytest.mark.skipif(ds_is_older("1.4.1.2"), reason="Not implemented")
def test_delete_default_group(automember_fixture, topo):
"""If memberof is enable and a user became member of default group
@@ -179,6 +180,51 @@ def test_delete_default_group(automember_fixture, topo):
user_1.delete()
topo.standalone.setLogLevel(0)
+(a)pytest.mark.skipif(ds_is_older("1.4.3.3"), reason="Not implemented")
+def test_no_default_group(automember_fixture, topo):
+ """If memberof is enable and a user became member of default group
+ and default group does not exist then an INFO should be logged
+
+ :id: 8882972f-fb3e-4d77-9729-0235897676bc
+ :setup: Standalone instance, enabled Auto Membership Plugin
+ :steps:
+ 1. Enable memberof plugin
+ 2. Set errorlog level to 0 (default)
+ 3. delete the default group
+ 4. Create a user
+ 5. Retrieve message in log
+ :expectedresults:
+ 1. Should be success
+ 2. Should be success
+ 3. Should be success
+ 4. Should be success
+ 5. Should be success
+ """
+
+ (group, automembers, automember) = automember_fixture
+
+ from lib389.plugins import MemberOfPlugin
+ memberof = MemberOfPlugin(topo.standalone)
+ memberof.enable()
+ topo.standalone.restart()
+ topo.standalone.setLogLevel(0)
+
+ # delete it if it exists
+ try:
+ group.get_attr_val_utf8('creatorsname')
+ group.delete()
+ except ldap.NO_SUCH_OBJECT:
+ pass
+ users = UserAccounts(topo.standalone, DEFAULT_SUFFIX)
+ user_1 = users.create_test_user(uid=1)
+
+ try:
+ error_lines = topo.standalone.ds_error_log.match('.*auto-membership-plugin - automember_update_member_value - group .default or target. does not exist .%s.$' % group.dn)
+ assert (len(error_lines) > 0)
+ finally:
+ user_1.delete()
+ topo.standalone.setLogLevel(0)
+
@pytest.mark.skipif(ds_is_older("1.4.1.2"), reason="Not implemented")
def test_delete_target_group(automember_fixture, topo):
"""If memberof is enabld and a user became member of target group
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 185fc26..7c875c8 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -1638,7 +1638,7 @@ automember_update_member_value(Slapi_Entry *member_e, const char *group_dn, char
if (rc != LDAP_SUCCESS || group_entry == NULL) {
if (rc == LDAP_NO_SUCH_OBJECT) {
/* the automember group (default or target) does not exist, just skip this definition */
- slapi_log_err(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_err(SLAPI_LOG_INFO, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_member_value - group (default or target) does not exist (%s)\n",
group_dn);
rc = 0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 2b54404 Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
2b54404 is described below
commit 2b5440402581fd0303f55118ae334ac455146fde
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Wed Feb 26 14:35:26 2020 +0100
Ticket 50914 - No error returned when adding an entry matching filters for a non existing automember group
Bug Description:
automember plugin adds matching members to a target group. If the target group
does not exist a message is logged but with SLAPI_LOG_PLUGIN level.
Fix Description:
Such situation (target group missing/deleted) is rare. It worths logging
the message, that automember did not add a member, at SLAPI_LOG_INFO
https://pagure.io/389-ds-base/pull-request/50285
Reviewed by: Mark Reynolds
Platforms tested: F30
Flag Day: no
Doc impact: no
---
.../suites/automember_plugin/automember_test.py | 46 ++++++++++++++++++++++
ldap/servers/plugins/automember/automember.c | 2 +-
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/dirsrvtests/tests/suites/automember_plugin/automember_test.py b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
index eda9950..b34747e 100644
--- a/dirsrvtests/tests/suites/automember_plugin/automember_test.py
+++ b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
@@ -140,6 +140,7 @@ def test_adduser(automember_fixture, topo):
assert group.is_member(user.dn)
user.delete()
+
@pytest.mark.skipif(ds_is_older("1.4.1.2"), reason="Not implemented")
def test_delete_default_group(automember_fixture, topo):
"""If memberof is enable and a user became member of default group
@@ -179,6 +180,51 @@ def test_delete_default_group(automember_fixture, topo):
user_1.delete()
topo.standalone.setLogLevel(0)
+(a)pytest.mark.skipif(ds_is_older("1.4.3.3"), reason="Not implemented")
+def test_no_default_group(automember_fixture, topo):
+ """If memberof is enable and a user became member of default group
+ and default group does not exist then an INFO should be logged
+
+ :id: 8882972f-fb3e-4d77-9729-0235897676bc
+ :setup: Standalone instance, enabled Auto Membership Plugin
+ :steps:
+ 1. Enable memberof plugin
+ 2. Set errorlog level to 0 (default)
+ 3. delete the default group
+ 4. Create a user
+ 5. Retrieve message in log
+ :expectedresults:
+ 1. Should be success
+ 2. Should be success
+ 3. Should be success
+ 4. Should be success
+ 5. Should be success
+ """
+
+ (group, automembers, automember) = automember_fixture
+
+ from lib389.plugins import MemberOfPlugin
+ memberof = MemberOfPlugin(topo.standalone)
+ memberof.enable()
+ topo.standalone.restart()
+ topo.standalone.setLogLevel(0)
+
+ # delete it if it exists
+ try:
+ group.get_attr_val_utf8('creatorsname')
+ group.delete()
+ except ldap.NO_SUCH_OBJECT:
+ pass
+ users = UserAccounts(topo.standalone, DEFAULT_SUFFIX)
+ user_1 = users.create_test_user(uid=1)
+
+ try:
+ error_lines = topo.standalone.ds_error_log.match('.*auto-membership-plugin - automember_update_member_value - group .default or target. does not exist .%s.$' % group.dn)
+ assert (len(error_lines) > 0)
+ finally:
+ user_1.delete()
+ topo.standalone.setLogLevel(0)
+
@pytest.mark.skipif(ds_is_older("1.4.1.2"), reason="Not implemented")
def test_delete_target_group(automember_fixture, topo):
"""If memberof is enabld and a user became member of target group
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 185fc26..7c875c8 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -1638,7 +1638,7 @@ automember_update_member_value(Slapi_Entry *member_e, const char *group_dn, char
if (rc != LDAP_SUCCESS || group_entry == NULL) {
if (rc == LDAP_NO_SUCH_OBJECT) {
/* the automember group (default or target) does not exist, just skip this definition */
- slapi_log_err(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_err(SLAPI_LOG_INFO, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_member_value - group (default or target) does not exist (%s)\n",
group_dn);
rc = 0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 074dac5 Issue 50909 - nsDS5ReplicaId cant be set to the old value it had before
074dac5 is described below
commit 074dac5172e775868cb1a89e36fd5da47045a036
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Feb 24 15:32:03 2020 -0500
Issue 50909 - nsDS5ReplicaId cant be set to the old value it had before
Bug Description: We were not handling the process of changing the replica
type and id correctly. For one, we were not correctly
handling a change to a hub/consumer, but it just happened
to work by accident in most cases. In other caes you
could not change the rid more than once.
Fix Description: Changed the value checking to allow ID changes to 65535
which allowed the type/id pointers to be set correctly.
Then the checking of the type & ID change combination had
to be revised.
Also, removed the option to get just set the RID or type
from dsconf. Only replication promotion/demotion should
be touching these values.
relates: https://pagure.io/389-ds-base/issue/50909
Reviewed by: firstyear & tbordaz(Thanks!!)
(cherry picked from commit ea4fa549e6daeba648ce11c8c2ce4e7688ffab7b)
---
.../suites/replication/replica_config_test.py | 2 +-
.../plugins/replication/repl5_replica_config.c | 22 +++++++++++-----------
src/lib389/lib389/cli_conf/replication.py | 3 ---
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/dirsrvtests/tests/suites/replication/replica_config_test.py b/dirsrvtests/tests/suites/replication/replica_config_test.py
index 599f6ac..14267a2 100644
--- a/dirsrvtests/tests/suites/replication/replica_config_test.py
+++ b/dirsrvtests/tests/suites/replication/replica_config_test.py
@@ -43,7 +43,7 @@ agmt_dict = {'cn': 'test_agreement',
repl_add_attrs = [('nsDS5ReplicaType', '-1', '4', overflow, notnum, '1'),
('nsDS5Flags', '-1', '2', overflow, notnum, '1'),
- ('nsDS5ReplicaId', '0', '65535', overflow, notnum, '1'),
+ ('nsDS5ReplicaId', '0', '65536', overflow, notnum, '1'),
('nsds5ReplicaPurgeDelay', '-2', too_big, overflow, notnum, '1'),
('nsDS5ReplicaBindDnGroupCheckInterval', '-2', too_big, overflow, notnum, '1'),
('nsds5ReplicaTombstonePurgeInterval', '-2', too_big, overflow, notnum, '1'),
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 02b36f6..d64d4bf 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -461,7 +461,7 @@ replica_config_modify(Slapi_PBlock *pb,
}
} else if (strcasecmp(config_attr, attr_replicaId) == 0) {
int64_t rid = 0;
- if (repl_config_valid_num(config_attr, config_attr_value, 1, 65534, returncode, errortext, &rid) == 0) {
+ if (repl_config_valid_num(config_attr, config_attr_value, 1, MAX_REPLICA_ID, returncode, errortext, &rid) == 0) {
slapi_ch_free_string(&new_repl_id);
new_repl_id = slapi_ch_strdup(config_attr_value);
} else {
@@ -890,7 +890,7 @@ replica_config_search(Slapi_PBlock *pb,
static int
replica_config_change_type_and_id(Replica *r, const char *new_type, const char *new_id, char *returntext, int apply_mods)
{
- int type;
+ int type = REPLICA_TYPE_READONLY; /* by default - replica is read-only */
ReplicaType oldtype;
ReplicaId rid;
ReplicaId oldrid;
@@ -899,21 +899,21 @@ replica_config_change_type_and_id(Replica *r, const char *new_type, const char *
oldtype = replica_get_type(r);
oldrid = replica_get_rid(r);
- if (new_type == NULL) /* by default - replica is read-only */
- {
- type = REPLICA_TYPE_READONLY;
+ if (new_type == NULL) {
+ if (oldtype) {
+ type = oldtype;
+ }
} else {
type = atoi(new_type);
if (type <= REPLICA_TYPE_UNKNOWN || type >= REPLICA_TYPE_END) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "invalid replica type %d", type);
return LDAP_OPERATIONS_ERROR;
}
- }
-
- /* disallow changing type to itself just to permit a replica ID change */
- if (oldtype == type) {
- PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "replica type is already %d - not changing", type);
- return LDAP_OPERATIONS_ERROR;
+ /* disallow changing type to itself just to permit a replica ID change */
+ if (oldtype == type) {
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "replica type is already %d - not changing", type);
+ return LDAP_OPERATIONS_ERROR;
+ }
}
if (type == REPLICA_TYPE_READONLY) {
diff --git a/src/lib389/lib389/cli_conf/replication.py b/src/lib389/lib389/cli_conf/replication.py
index 7acbb33..1c0c925 100644
--- a/src/lib389/lib389/cli_conf/replication.py
+++ b/src/lib389/lib389/cli_conf/replication.py
@@ -1189,9 +1189,6 @@ def create_parser(subparsers):
repl_set_parser = repl_subcommands.add_parser('set', help='Set an attribute in the replication configuration')
repl_set_parser.set_defaults(func=set_repl_config)
repl_set_parser.add_argument('--suffix', required=True, help='The DN of the replication suffix')
- repl_set_parser.add_argument('--replica-id', help="The Replication Identifier number")
- repl_set_parser.add_argument('--replica-role', help="The Replication role: master, hub, or consumer")
-
repl_set_parser.add_argument('--repl-add-bind-dn', help="Add a bind (supplier) DN")
repl_set_parser.add_argument('--repl-del-bind-dn', help="Remove a bind (supplier) DN")
repl_set_parser.add_argument('--repl-add-ref', help="Add a replication referral (for consumers only)")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.