[Pkg-fedora-ds-maintainers] 389-ds-base: Changes to 'upstream'
Timo Aaltonen
tjaalton at moszumanska.debian.org
Mon Apr 18 15:11:17 UTC 2016
VERSION.sh | 2
dev/null |binary
dirsrvtests/data/README | 11
dirsrvtests/data/basic/dse.ldif.broken | 95
dirsrvtests/data/ticket47953/ticket47953.ldif | 27
dirsrvtests/data/ticket48212/example1k_posix.ldif |17017 ----------
dirsrvtests/suites/acct_usability_plugin/acct_usability_test.py | 93
dirsrvtests/suites/acctpolicy_plugin/acctpolicy_test.py | 93
dirsrvtests/suites/acl/acl_test.py | 1059
dirsrvtests/suites/attr_encryption/attr_encrypt_test.py | 93
dirsrvtests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py | 248
dirsrvtests/suites/automember_plugin/automember_test.py | 93
dirsrvtests/suites/basic/basic_test.py | 775
dirsrvtests/suites/betxns/betxn_test.py | 258
dirsrvtests/suites/chaining_plugin/chaining_test.py | 93
dirsrvtests/suites/clu/clu_test.py | 115
dirsrvtests/suites/clu/db2ldif_test.py | 92
dirsrvtests/suites/collation_plugin/collatation_test.py | 93
dirsrvtests/suites/config/config_test.py | 198
dirsrvtests/suites/cos_plugin/cos_test.py | 93
dirsrvtests/suites/deref_plugin/deref_test.py | 93
dirsrvtests/suites/disk_monitoring/disk_monitor_test.py | 93
dirsrvtests/suites/distrib_plugin/distrib_test.py | 93
dirsrvtests/suites/dna_plugin/dna_test.py | 93
dirsrvtests/suites/ds_logs/ds_logs_test.py | 93
dirsrvtests/suites/dynamic-plugins/plugin_tests.py | 2406 -
dirsrvtests/suites/dynamic-plugins/stress_tests.py | 146
dirsrvtests/suites/dynamic-plugins/test_dynamic_plugins.py | 493
dirsrvtests/suites/filter/filter_test.py | 152
dirsrvtests/suites/get_effective_rights/ger_test.py | 93
dirsrvtests/suites/ldapi/ldapi_test.py | 93
dirsrvtests/suites/linkedattrs_plugin/linked_attrs_test.py | 93
dirsrvtests/suites/mapping_tree/mapping_tree_test.py | 93
dirsrvtests/suites/memberof_plugin/memberof_test.py | 176
dirsrvtests/suites/memory_leaks/range_search_test.py | 138
dirsrvtests/suites/mep_plugin/mep_test.py | 93
dirsrvtests/suites/monitor/monitor_test.py | 93
dirsrvtests/suites/paged_results/paged_results_test.py | 93
dirsrvtests/suites/pam_passthru_plugin/pam_test.py | 93
dirsrvtests/suites/passthru_plugin/passthru_test.py | 93
dirsrvtests/suites/password/password_test.py | 143
dirsrvtests/suites/password/pwdAdmin_test.py | 447
dirsrvtests/suites/password/pwdPolicy_test.py | 82
dirsrvtests/suites/posix_winsync_plugin/posix_winsync_test.py | 93
dirsrvtests/suites/psearch/psearch_test.py | 93
dirsrvtests/suites/referint_plugin/referint_test.py | 93
dirsrvtests/suites/replication/cleanallruv_test.py | 1494
dirsrvtests/suites/replication/wait_for_async_feature_test.py | 280
dirsrvtests/suites/replsync_plugin/repl_sync_test.py | 93
dirsrvtests/suites/resource_limits/res_limits_test.py | 93
dirsrvtests/suites/retrocl_plugin/retrocl_test.py | 93
dirsrvtests/suites/reverpwd_plugin/reverpwd_test.py | 93
dirsrvtests/suites/roles_plugin/roles_test.py | 93
dirsrvtests/suites/rootdn_plugin/rootdn_plugin_test.py | 778
dirsrvtests/suites/sasl/sasl_test.py | 93
dirsrvtests/suites/schema/test_schema.py | 228
dirsrvtests/suites/schema_reload_plugin/schema_reload_test.py | 93
dirsrvtests/suites/snmp/snmp_test.py | 93
dirsrvtests/suites/ssl/ssl_test.py | 93
dirsrvtests/suites/syntax_plugin/syntax_test.py | 93
dirsrvtests/suites/usn_plugin/usn_test.py | 93
dirsrvtests/suites/views_plugin/views_test.py | 93
dirsrvtests/suites/vlv/vlv_test.py | 93
dirsrvtests/suites/whoami_plugin/whoami_test.py | 93
dirsrvtests/tests/data/README | 11
dirsrvtests/tests/data/basic/dse.ldif.broken | 95
dirsrvtests/tests/data/ticket47953/ticket47953.ldif | 27
dirsrvtests/tests/data/ticket47988/schema_ipa3.3.tar.gz |binary
dirsrvtests/tests/data/ticket47988/schema_ipa4.1.tar.gz |binary
dirsrvtests/tests/data/ticket48212/example1k_posix.ldif |17017 ++++++++++
dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py | 93
dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py | 93
dirsrvtests/tests/suites/acl/acl_test.py | 1059
dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py | 93
dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py | 248
dirsrvtests/tests/suites/automember_plugin/automember_test.py | 93
dirsrvtests/tests/suites/basic/basic_test.py | 775
dirsrvtests/tests/suites/betxns/betxn_test.py | 258
dirsrvtests/tests/suites/chaining_plugin/chaining_test.py | 93
dirsrvtests/tests/suites/clu/clu_test.py | 115
dirsrvtests/tests/suites/clu/db2ldif_test.py | 92
dirsrvtests/tests/suites/collation_plugin/collatation_test.py | 93
dirsrvtests/tests/suites/config/config_test.py | 198
dirsrvtests/tests/suites/cos_plugin/cos_test.py | 93
dirsrvtests/tests/suites/deref_plugin/deref_test.py | 93
dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py | 93
dirsrvtests/tests/suites/distrib_plugin/distrib_test.py | 93
dirsrvtests/tests/suites/dna_plugin/dna_test.py | 93
dirsrvtests/tests/suites/ds_logs/ds_logs_test.py | 93
dirsrvtests/tests/suites/dynamic-plugins/plugin_tests.py | 2406 +
dirsrvtests/tests/suites/dynamic-plugins/stress_tests.py | 146
dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py | 493
dirsrvtests/tests/suites/filter/filter_test.py | 152
dirsrvtests/tests/suites/get_effective_rights/ger_test.py | 93
dirsrvtests/tests/suites/ldapi/ldapi_test.py | 93
dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py | 93
dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py | 93
dirsrvtests/tests/suites/memberof_plugin/memberof_test.py | 176
dirsrvtests/tests/suites/memory_leaks/range_search_test.py | 138
dirsrvtests/tests/suites/mep_plugin/mep_test.py | 93
dirsrvtests/tests/suites/monitor/monitor_test.py | 93
dirsrvtests/tests/suites/paged_results/paged_results_test.py | 93
dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py | 93
dirsrvtests/tests/suites/passthru_plugin/passthru_test.py | 93
dirsrvtests/tests/suites/password/password_test.py | 143
dirsrvtests/tests/suites/password/pwdAdmin_test.py | 447
dirsrvtests/tests/suites/password/pwdPolicy_test.py | 82
dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py | 93
dirsrvtests/tests/suites/psearch/psearch_test.py | 93
dirsrvtests/tests/suites/referint_plugin/referint_test.py | 93
dirsrvtests/tests/suites/replication/cleanallruv_test.py | 1494
dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py | 280
dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py | 93
dirsrvtests/tests/suites/resource_limits/res_limits_test.py | 93
dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py | 93
dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py | 93
dirsrvtests/tests/suites/roles_plugin/roles_test.py | 93
dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py | 778
dirsrvtests/tests/suites/sasl/sasl_test.py | 93
dirsrvtests/tests/suites/schema/test_schema.py | 228
dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py | 93
dirsrvtests/tests/suites/snmp/snmp_test.py | 93
dirsrvtests/tests/suites/ssl/ssl_test.py | 93
dirsrvtests/tests/suites/syntax_plugin/syntax_test.py | 93
dirsrvtests/tests/suites/usn_plugin/usn_test.py | 93
dirsrvtests/tests/suites/views_plugin/views_test.py | 93
dirsrvtests/tests/suites/vlv/vlv_test.py | 93
dirsrvtests/tests/suites/whoami_plugin/whoami_test.py | 93
dirsrvtests/tests/tickets/finalizer.py | 64
dirsrvtests/tests/tickets/ticket365_test.py | 169
dirsrvtests/tests/tickets/ticket47313_test.py | 174
dirsrvtests/tests/tickets/ticket47384_test.py | 167
dirsrvtests/tests/tickets/ticket47431_test.py | 259
dirsrvtests/tests/tickets/ticket47462_test.py | 365
dirsrvtests/tests/tickets/ticket47490_test.py | 691
dirsrvtests/tests/tickets/ticket47553_test.py | 166
dirsrvtests/tests/tickets/ticket47560_test.py | 253
dirsrvtests/tests/tickets/ticket47573_test.py | 347
dirsrvtests/tests/tickets/ticket47619_test.py | 220
dirsrvtests/tests/tickets/ticket47640_test.py | 130
dirsrvtests/tests/tickets/ticket47653MMR_test.py | 473
dirsrvtests/tests/tickets/ticket47653_test.py | 381
dirsrvtests/tests/tickets/ticket47664_test.py | 225
dirsrvtests/tests/tickets/ticket47669_test.py | 265
dirsrvtests/tests/tickets/ticket47676_test.py | 406
dirsrvtests/tests/tickets/ticket47714_test.py | 263
dirsrvtests/tests/tickets/ticket47721_test.py | 468
dirsrvtests/tests/tickets/ticket47781_test.py | 188
dirsrvtests/tests/tickets/ticket47787_test.py | 561
dirsrvtests/tests/tickets/ticket47808_test.py | 166
dirsrvtests/tests/tickets/ticket47815_test.py | 179
dirsrvtests/tests/tickets/ticket47819_test.py | 296
dirsrvtests/tests/tickets/ticket47823_test.py | 1021
dirsrvtests/tests/tickets/ticket47824_test.py | 265
dirsrvtests/tests/tickets/ticket47828_test.py | 728
dirsrvtests/tests/tickets/ticket47829_test.py | 656
dirsrvtests/tests/tickets/ticket47833_test.py | 274
dirsrvtests/tests/tickets/ticket47838_test.py | 841
dirsrvtests/tests/tickets/ticket47869MMR_test.py | 346
dirsrvtests/tests/tickets/ticket47871_test.py | 226
dirsrvtests/tests/tickets/ticket47900_test.py | 344
dirsrvtests/tests/tickets/ticket47910_test.py | 205
dirsrvtests/tests/tickets/ticket47920_test.py | 194
dirsrvtests/tests/tickets/ticket47921_test.py | 163
dirsrvtests/tests/tickets/ticket47927_test.py | 313
dirsrvtests/tests/tickets/ticket47931_test.py | 207
dirsrvtests/tests/tickets/ticket47937_test.py | 188
dirsrvtests/tests/tickets/ticket47950_test.py | 223
dirsrvtests/tests/tickets/ticket47953_test.py | 128
dirsrvtests/tests/tickets/ticket47963_test.py | 199
dirsrvtests/tests/tickets/ticket47966_test.py | 227
dirsrvtests/tests/tickets/ticket47970_test.py | 158
dirsrvtests/tests/tickets/ticket47973_test.py | 185
dirsrvtests/tests/tickets/ticket47980_test.py | 662
dirsrvtests/tests/tickets/ticket47981_test.py | 295
dirsrvtests/tests/tickets/ticket47988_test.py | 503
dirsrvtests/tests/tickets/ticket48005_test.py | 415
dirsrvtests/tests/tickets/ticket48013_test.py | 134
dirsrvtests/tests/tickets/ticket48026_test.py | 168
dirsrvtests/tests/tickets/ticket48109_test.py | 394
dirsrvtests/tests/tickets/ticket48170_test.py | 96
dirsrvtests/tests/tickets/ticket48191_test.py | 323
dirsrvtests/tests/tickets/ticket48194_test.py | 499
dirsrvtests/tests/tickets/ticket48212_test.py | 210
dirsrvtests/tests/tickets/ticket48214_test.py | 171
dirsrvtests/tests/tickets/ticket48226_test.py | 249
dirsrvtests/tests/tickets/ticket48228_test.py | 336
dirsrvtests/tests/tickets/ticket48233_test.py | 105
dirsrvtests/tests/tickets/ticket48252_test.py | 178
dirsrvtests/tests/tickets/ticket48265_test.py | 130
dirsrvtests/tests/tickets/ticket48312_test.py | 168
dirsrvtests/tests/tickets/ticket48325_test.py | 270
dirsrvtests/tests/tickets/ticket48362_test.py | 278
dirsrvtests/tests/tickets/ticket48369_test.py | 124
dirsrvtests/tests/tickets/ticket48370_test.py | 236
dirsrvtests/tests/tickets/ticket48497_test.py | 177
dirsrvtests/tests/tickets/ticket48745_test.py | 185
dirsrvtests/tests/tickets/ticket48746_test.py | 213
dirsrvtests/tests/tickets/ticket48759_test.py | 285
dirsrvtests/tests/tmp/README | 10
dirsrvtests/tickets/finalizer.py | 64
dirsrvtests/tickets/ticket365_test.py | 169
dirsrvtests/tickets/ticket47313_test.py | 174
dirsrvtests/tickets/ticket47384_test.py | 167
dirsrvtests/tickets/ticket47431_test.py | 259
dirsrvtests/tickets/ticket47462_test.py | 365
dirsrvtests/tickets/ticket47490_test.py | 691
dirsrvtests/tickets/ticket47553_test.py | 166
dirsrvtests/tickets/ticket47560_test.py | 253
dirsrvtests/tickets/ticket47573_test.py | 347
dirsrvtests/tickets/ticket47619_test.py | 220
dirsrvtests/tickets/ticket47640_test.py | 130
dirsrvtests/tickets/ticket47653MMR_test.py | 473
dirsrvtests/tickets/ticket47653_test.py | 381
dirsrvtests/tickets/ticket47664_test.py | 225
dirsrvtests/tickets/ticket47669_test.py | 265
dirsrvtests/tickets/ticket47676_test.py | 406
dirsrvtests/tickets/ticket47714_test.py | 263
dirsrvtests/tickets/ticket47721_test.py | 468
dirsrvtests/tickets/ticket47781_test.py | 188
dirsrvtests/tickets/ticket47787_test.py | 561
dirsrvtests/tickets/ticket47808_test.py | 166
dirsrvtests/tickets/ticket47815_test.py | 179
dirsrvtests/tickets/ticket47819_test.py | 296
dirsrvtests/tickets/ticket47823_test.py | 1021
dirsrvtests/tickets/ticket47824_test.py | 265
dirsrvtests/tickets/ticket47828_test.py | 728
dirsrvtests/tickets/ticket47829_test.py | 656
dirsrvtests/tickets/ticket47833_test.py | 274
dirsrvtests/tickets/ticket47838_test.py | 841
dirsrvtests/tickets/ticket47869MMR_test.py | 346
dirsrvtests/tickets/ticket47871_test.py | 226
dirsrvtests/tickets/ticket47900_test.py | 344
dirsrvtests/tickets/ticket47910_test.py | 205
dirsrvtests/tickets/ticket47920_test.py | 194
dirsrvtests/tickets/ticket47921_test.py | 163
dirsrvtests/tickets/ticket47927_test.py | 313
dirsrvtests/tickets/ticket47931_test.py | 207
dirsrvtests/tickets/ticket47937_test.py | 188
dirsrvtests/tickets/ticket47950_test.py | 223
dirsrvtests/tickets/ticket47953_test.py | 128
dirsrvtests/tickets/ticket47963_test.py | 199
dirsrvtests/tickets/ticket47966_test.py | 227
dirsrvtests/tickets/ticket47970_test.py | 158
dirsrvtests/tickets/ticket47973_test.py | 185
dirsrvtests/tickets/ticket47980_test.py | 662
dirsrvtests/tickets/ticket47981_test.py | 295
dirsrvtests/tickets/ticket47988_test.py | 503
dirsrvtests/tickets/ticket48005_test.py | 415
dirsrvtests/tickets/ticket48013_test.py | 134
dirsrvtests/tickets/ticket48026_test.py | 168
dirsrvtests/tickets/ticket48109_test.py | 394
dirsrvtests/tickets/ticket48170_test.py | 96
dirsrvtests/tickets/ticket48191_test.py | 323
dirsrvtests/tickets/ticket48194_test.py | 499
dirsrvtests/tickets/ticket48212_test.py | 210
dirsrvtests/tickets/ticket48214_test.py | 171
dirsrvtests/tickets/ticket48226_test.py | 249
dirsrvtests/tickets/ticket48228_test.py | 336
dirsrvtests/tickets/ticket48233_test.py | 105
dirsrvtests/tickets/ticket48252_test.py | 178
dirsrvtests/tickets/ticket48265_test.py | 130
dirsrvtests/tickets/ticket48312_test.py | 168
dirsrvtests/tickets/ticket48325_test.py | 270
dirsrvtests/tickets/ticket48362_test.py | 278
dirsrvtests/tickets/ticket48369_test.py | 124
dirsrvtests/tickets/ticket48370_test.py | 236
dirsrvtests/tmp/README | 10
ldap/servers/plugins/replication/repl5_replica.c | 2
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 44
ldap/servers/slapd/plugin_mr.c | 124
rpm/389-ds-base.spec.in | 2
272 files changed, 51275 insertions(+), 50385 deletions(-)
New commits:
commit 718bcf263fd0ce4d314f36b84a6b64b40aeb1182
Author: Noriko Hosoi <nhosoi at redhat.com>
Date: Wed Mar 23 11:00:11 2016 -0700
bump version to 1.3.4.9
diff --git a/VERSION.sh b/VERSION.sh
index ca1c3ed..8892292 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=3
-VERSION_MAINT=4.8
+VERSION_MAINT=4.9
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
commit 54b200b0db7850e202fdd969022b9f0f26fe362c
Author: Ludwig Krispenz <lkrispen at redhat.com>
Date: Tue Mar 15 12:18:22 2016 +0100
add testcase for ticket 48759
Fixes for ticket 47859 reviewed by Noriko, thanks
diff --git a/dirsrvtests/tests/tickets/ticket48759_test.py b/dirsrvtests/tests/tickets/ticket48759_test.py
new file mode 100644
index 0000000..93c3223
--- /dev/null
+++ b/dirsrvtests/tests/tickets/ticket48759_test.py
@@ -0,0 +1,285 @@
+# --- BEGIN COPYRIGHT BLOCK ---
+# Copyright (C) 2015 Red Hat, Inc.
+# All rights reserved.
+#
+# License: GPL (version 3 or any later version).
+# See LICENSE for details.
+# --- END COPYRIGHT BLOCK ---
+#
+import os
+import sys
+import time
+import ldap
+import logging
+import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+
+log = logging.getLogger(__name__)
+
+installation_prefix = None
+
+MEMBEROF_PLUGIN_DN = ('cn=' + PLUGIN_MEMBER_OF + ',cn=plugins,cn=config')
+GROUP_DN = ("cn=group," + DEFAULT_SUFFIX)
+MEMBER_DN_COMP = "uid=member"
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+ at pytest.fixture(scope="module")
+def topology(request):
+ '''
+ This fixture is used to standalone topology for the 'module'.
+ '''
+ global installation_prefix
+
+ if installation_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation_prefix
+
+ standalone = DirSrv(verbose=False)
+
+ # Args for the standalone instance
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+
+ # Get the status of the instance and restart it if it exists
+ instance_standalone = standalone.exists()
+
+ # Remove the instance
+ if instance_standalone:
+ standalone.delete()
+
+ # Create the instance
+ standalone.create()
+
+ # Used to retrieve configuration information (dbdir, confdir...)
+ standalone.open()
+
+ # clear the tmp directory
+ standalone.clearTmpDir(__file__)
+
+ # Here we have standalone instance up and running
+ return TopologyStandalone(standalone)
+
+def _add_group_with_members(topology):
+ # Create group
+ try:
+ topology.standalone.add_s(Entry((GROUP_DN,
+ {'objectclass': 'top groupofnames'.split(),
+ 'cn': 'group'})))
+ except ldap.LDAPError as e:
+ log.fatal('Failed to add group: error ' + e.message['desc'])
+ assert False
+
+ # Add members to the group - set timeout
+ log.info('Adding members to the group...')
+ for idx in range(1, 5):
+ try:
+ MEMBER_VAL = ("uid=member%d,%s" % (idx, DEFAULT_SUFFIX))
+ topology.standalone.modify_s(GROUP_DN,
+ [(ldap.MOD_ADD,
+ 'member',
+ MEMBER_VAL)])
+ except ldap.LDAPError as e:
+ log.fatal('Failed to update group: member (%s) - error: %s' %
+ (MEMBER_VAL, e.message['desc']))
+ assert False
+
+def _find_retrocl_changes(topology, user_dn=None):
+ ents = topology.standalone.search_s('cn=changelog', ldap.SCOPE_SUBTREE, '(targetDn=%s)' %user_dn)
+ return len(ents)
+
+def _find_memberof(topology, user_dn=None, group_dn=None, find_result=True):
+ ent = topology.standalone.getEntry(user_dn, ldap.SCOPE_BASE, "(objectclass=*)", ['memberof'])
+ found = False
+ if ent.hasAttr('memberof'):
+
+ for val in ent.getValues('memberof'):
+ topology.standalone.log.info("!!!!!!! %s: memberof->%s" % (user_dn, val))
+ if val == group_dn:
+ found = True
+ break
+
+ if find_result:
+ assert(found)
+ else:
+ assert(not found)
+
+def test_ticket48759(topology):
+ """
+ The fix for ticket 48759 has to prevent plugin calls for tombstone purging
+
+ The test uses the memberof and retrocl plugins to verify this.
+ In tombstone purging without the fix the mmeberof plugin is called,
+ if the tombstone entry is a group,
+ it modifies the user entries for the group
+ and if retrocl is enabled this mod is written to the retrocl
+
+ The test sequence is:
+ - enable replication
+ - enable memberof and retro cl plugin
+ - add user entries
+ - add a group and add the users as members
+ - verify memberof is set to users
+ - delete the group
+ - verify memberof is removed from users
+ - add group again
+ - verify memberof is set to users
+ - get number of changes in retro cl for one user
+ - configure tombstone purging
+ - wait for purge interval to pass
+ - add a dummy entry to increase maxcsn
+ - wait for purge interval to pass two times
+ - get number of changes in retro cl for user again
+ - assert there was no additional change
+ """
+
+ log.info('Testing Ticket 48759 - no plugin calls for tombstone purging')
+
+ #
+ # Setup Replication
+ #
+ log.info('Setting up replication...')
+ topology.standalone.replica.enableReplication(suffix=DEFAULT_SUFFIX, role=REPLICAROLE_MASTER,
+ replicaId=REPLICAID_MASTER_1)
+
+ #
+ # enable dynamic plugins, memberof and retro cl plugin
+ #
+ log.info('Enable plugins...')
+ try:
+ topology.standalone.modify_s(DN_CONFIG,
+ [(ldap.MOD_REPLACE,
+ 'nsslapd-dynamic-plugins',
+ 'on')])
+ except ldap.LDAPError as e:
+ ldap.error('Failed to enable dynamic plugins! ' + e.message['desc'])
+ assert False
+
+ topology.standalone.plugins.enable(name=PLUGIN_MEMBER_OF)
+ topology.standalone.plugins.enable(name=PLUGIN_RETRO_CHANGELOG)
+ # Configure memberOf group attribute
+ try:
+ topology.standalone.modify_s(MEMBEROF_PLUGIN_DN,
+ [(ldap.MOD_REPLACE,
+ 'memberofgroupattr',
+ 'member')])
+ except ldap.LDAPError as e:
+ log.fatal('Failed to configure memberOf plugin: error ' + e.message['desc'])
+ assert False
+
+
+ #
+ # create some users and a group
+ #
+ log.info('create users and group...')
+ for idx in range(1, 5):
+ try:
+ USER_DN = ("uid=member%d,%s" % (idx, DEFAULT_SUFFIX))
+ topology.standalone.add_s(Entry((USER_DN,
+ {'objectclass': 'top extensibleObject'.split(),
+ 'uid': 'member%d' % (idx)})))
+ except ldap.LDAPError as e:
+ log.fatal('Failed to add user (%s): error %s' % (USER_DN, e.message['desc']))
+ assert False
+
+ _add_group_with_members(topology)
+
+ MEMBER_VAL = ("uid=member2,%s" % DEFAULT_SUFFIX)
+ time.sleep(1)
+ _find_memberof(topology, MEMBER_VAL, GROUP_DN, True)
+
+ # delete group
+ log.info('delete group...')
+ try:
+ topology.standalone.delete_s(GROUP_DN)
+ except ldap.LDAPError as e:
+ log.error('Failed to delete entry: ' + e.message['desc'])
+ assert False
+
+ time.sleep(1)
+ _find_memberof(topology, MEMBER_VAL, GROUP_DN, False)
+
+ # add group again
+ log.info('add group again')
+ _add_group_with_members(topology)
+ time.sleep(1)
+ _find_memberof(topology, MEMBER_VAL, GROUP_DN, True)
+
+ #
+ # get number of changelog records for one user entry
+ log.info('get number of changes for %s before tombstone purging' % MEMBER_VAL)
+ changes_pre = _find_retrocl_changes(topology, MEMBER_VAL)
+
+ # configure tombstone purging
+ args = {REPLICA_PRECISE_PURGING: 'on',
+ REPLICA_PURGE_DELAY: '5',
+ REPLICA_PURGE_INTERVAL: '5'}
+ try:
+ topology.standalone.replica.setProperties(DEFAULT_SUFFIX, None, None, args)
+ except:
+ log.fatal('Failed to configure replica')
+ assert False
+
+ # Wait for the interval to pass
+ log.info('Wait for tombstone purge interval to pass ...')
+ time.sleep(6)
+
+ # Add an entry to trigger replication
+ log.info('add dummy entry')
+ try:
+ topology.standalone.add_s(Entry(('cn=test_entry,dc=example,dc=com', {
+ 'objectclass': 'top person'.split(),
+ 'sn': 'user',
+ 'cn': 'entry1'})))
+ except ldap.LDAPError as e:
+ log.error('Failed to add entry: ' + e.message['desc'])
+ assert False
+
+ # check memberof is still correct
+ time.sleep(1)
+ _find_memberof(topology, MEMBER_VAL, GROUP_DN, True)
+
+ # Wait for the interval to pass again
+ log.info('Wait for tombstone purge interval to pass again...')
+ time.sleep(10)
+
+ #
+ # get number of changelog records for one user entry
+ log.info('get number of changes for %s before tombstone purging' % MEMBER_VAL)
+ changes_post = _find_retrocl_changes(topology, MEMBER_VAL)
+
+ assert (changes_pre == changes_post)
+
+
+def test_ticket48759_final(topology):
+ topology.standalone.delete()
+ log.info('Testcase PASSED')
+
+
+def run_isolated():
+ '''
+ run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
+ To run isolated without py.test, you need to
+ - edit this file and comment '@pytest.fixture' line before 'topology' function.
+ - set the installation prefix
+ - run this program
+ '''
+ global installation_prefix
+ installation_prefix = None
+
+ topo = topology(True)
+ test_ticket48759(topo)
+ test_ticket48759_final(topo)
+
+if __name__ == '__main__':
+ run_isolated()
commit c6e146b374f8fdd20ab83f3bde2be377d20a7926
Author: Ludwig Krispenz <lkrispen at redhat.com>
Date: Tue Mar 15 12:10:21 2016 +0100
Ticket 48759 - no plugin calls in tombstone purging
Bug Description: BE_TXN plugins are called for tombstone purging
Fix Description: check in delete operation if the deleted enntry is
a tombstone, don't call plugins for tombstones
https://fedorahosted.org/389/ticket/48759
Reviewed by: ?
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 100a71d..5b24af2 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -346,24 +346,26 @@ ldbm_back_delete( Slapi_PBlock *pb )
if for some reason they ever do, do not use e->ep_entry since
it could be in the cache and referenced by other search threads -
instead, have them modify a copy of the entry */
- retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN);
- if (retval) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE,
- "SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
- "returned error code %d\n", retval );
- if (!ldap_result_code) {
- slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
- }
- if (!opreturn) {
- slapi_pblock_get( pb, SLAPI_PLUGIN_OPRETURN, &opreturn );
- }
- if (!opreturn) {
- slapi_pblock_set( pb, SLAPI_PLUGIN_OPRETURN,
- ldap_result_code ?
- &ldap_result_code : &retval );
+ if (!delete_tombstone_entry) {
+ retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN);
+ if (retval) {
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE,
+ "SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
+ "returned error code %d\n", retval );
+ if (!ldap_result_code) {
+ slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
+ }
+ if (!opreturn) {
+ slapi_pblock_get( pb, SLAPI_PLUGIN_OPRETURN, &opreturn );
+ }
+ if (!opreturn) {
+ slapi_pblock_set( pb, SLAPI_PLUGIN_OPRETURN,
+ ldap_result_code ?
+ &ldap_result_code : &retval );
+ }
+ slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
+ goto error_return;
}
- slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
- goto error_return;
}
/*
@@ -640,7 +642,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
}
} /* if (0 == retry_count) just once */
- else {
+ else if (!delete_tombstone_entry) {
/* call the transaction pre delete plugins not just once
* but every time transaction is restarted. */
/* these should not need to modify the entry to be deleted -
@@ -1209,7 +1211,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
/* call the transaction post delete plugins just before the commit */
- if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
+ if (!delete_tombstone_entry &&
+ plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
LDAPDebug0Args( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
"returned error code\n" );
if (!ldap_result_code) {
@@ -1361,7 +1364,8 @@ error_return:
}
/* call the transaction post delete plugins just before the abort */
- if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
+ if (!delete_tombstone_entry &&
+ plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
commit c9bd68813c658e1caeaba9ee2c2aef62f0cc6dd6
Author: Noriko Hosoi <nhosoi at redhat.com>
Date: Tue Mar 8 14:52:37 2016 -0800
Ticket #48757 - License tag does not match actual license of code
Fix Description: License tag in the spec file was updated to match the
actual license of code.
(cherry picked from commit 415d8553eddfe9b19fd9b8d8be9b934bf75a5765)
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index ecdecb5..b19ed0c 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -38,7 +38,7 @@ Name: 389-ds-base
Version: __VERSION__
#Release: %{?relprefix}1%{?prerel}%{?dist}
Release: __RELEASE__%{?dist}
-License: GPLv2 with exceptions
+License: GPLv3+
URL: http://port389.org/
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
commit cba64d1ebff2ac68f2bf0d0d858335ef2517aef5
Author: Thierry Bordaz <tbordaz at redhat.com>
Date: Wed Mar 2 18:13:41 2016 +0100
Ticket 48746: Crash when indexing an attribute with a matching rule
Bug Description:
When creating a mr_indexer, we first look at the registered MR (global_mr_oids).
If the indexer is not registered or have no indexer create function, we try
- to find a plugin (possibly a custom one) that could provide such indexer create.
- use a default indexer
The problem is that going through the matching rule plugins, we pick the first one with
an indexer even if it applies to a different syntax.
For example, searching for an caseExactIA5Match MR plugin we select caseIgnoreIA5Match because
it appears first in the plugins list.
The consequence is that we may index with the wrong index function (and trigger
https://fedorahosted.org/389/ticket/48745) and picking a wrong indexer_create (or filter_create)
function the MR private in the pblock (SLAPI_PLUGIN_OBJECT) can be NULL
(https://fedorahosted.org/389/ticket/48746).
Also we can imagine an incorrect custom MR plugin that forgets to set this MR private object
and could trigger a crash. So use of MR private object should check if it was set.
Fix Description:
The fix is:
slapi_mr_indexer_create:
plugin_mr_filter_create:
If there is no register MR for a specific oid, we search a plugin
that can handle that oid (plugin_mr_find).
mr_wrap_mr_index_sv_fn:
mr_wrap_mr_index_fn:
default_mr_filter_match:
default_mr_filter_index:
hardening if a custom plugin index_create function did not set SLAPI_PLUGIN_OBJECT
https://fedorahosted.org/389/ticket/48746
Reviewed by: Rich Megginson (thanks Rich for all help/feedback and the review)
Platforms tested: F17
Flag Day: no
Doc impact: no
diff --git a/dirsrvtests/tests/tickets/ticket48745_test.py b/dirsrvtests/tests/tickets/ticket48745_test.py
new file mode 100644
index 0000000..bfbaf03
--- /dev/null
+++ b/dirsrvtests/tests/tickets/ticket48745_test.py
@@ -0,0 +1,185 @@
+import os
+import sys
+import time
+import ldap
+import logging
+#import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+from lib389.utils import *
+
+logging.getLogger(__name__).setLevel(logging.DEBUG)
+log = logging.getLogger(__name__)
+
+installation1_prefix = None
+
+NEW_ACCOUNT = "new_account"
+MAX_ACCOUNTS = 20
+
+MIXED_VALUE="/home/mYhOmEdIrEcToRy"
+LOWER_VALUE="/home/myhomedirectory"
+HOMEDIRECTORY_INDEX = 'cn=homeDirectory,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
+HOMEDIRECTORY_CN="homedirectory"
+MATCHINGRULE = 'nsMatchingRule'
+UIDNUMBER_INDEX = 'cn=uidnumber,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
+UIDNUMBER_CN="uidnumber"
+
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+ at pytest.fixture(scope="module")
+def topology(request):
+ global installation1_prefix
+ if installation1_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation1_prefix
+
+ # Creating standalone instance ...
+ standalone = DirSrv(verbose=False)
+ if installation1_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation1_prefix
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+ instance_standalone = standalone.exists()
+ if instance_standalone:
+ standalone.delete()
+ standalone.create()
+ standalone.open()
+
+ # Delete each instance in the end
+ def fin():
+ standalone.delete()
+ #request.addfinalizer(fin)
+
+ # Clear out the tmp dir
+ standalone.clearTmpDir(__file__)
+
+ return TopologyStandalone(standalone)
+
+def test_ticket48745_init(topology):
+ log.info("Initialization: add dummy entries for the tests")
+ for cpt in range(MAX_ACCOUNTS):
+ name = "%s%d" % (NEW_ACCOUNT, cpt)
+ topology.standalone.add_s(Entry(("uid=%s,%s" % (name, SUFFIX), {
+ 'objectclass': "top posixAccount".split(),
+ 'uid': name,
+ 'cn': name,
+ 'uidnumber': str(111),
+ 'gidnumber': str(222),
+ 'homedirectory': "/home/tbordaz_%d" % cpt})))
+
+def test_ticket48745_homeDirectory_indexed_cis(topology):
+ log.info("\n\nindex homeDirectory in caseIgnoreIA5Match and caseExactIA5Match")
+ try:
+ ent = topology.standalone.getEntry(HOMEDIRECTORY_INDEX, ldap.SCOPE_BASE)
+ except ldap.NO_SUCH_OBJECT:
+ topology.standalone.add_s(Entry((HOMEDIRECTORY_INDEX, {
+ 'objectclass': "top nsIndex".split(),
+ 'cn': HOMEDIRECTORY_CN,
+ 'nsSystemIndex': 'false',
+ 'nsIndexType': 'eq'})))
+ #log.info("attach debugger")
+ #time.sleep(60)
+
+ IGNORE_MR_NAME='caseIgnoreIA5Match'
+ EXACT_MR_NAME='caseExactIA5Match'
+ mod = [(ldap.MOD_REPLACE, MATCHINGRULE, (IGNORE_MR_NAME, EXACT_MR_NAME))]
+ topology.standalone.modify_s(HOMEDIRECTORY_INDEX, mod)
+
+ #topology.standalone.stop(timeout=10)
+ log.info("successfully checked that filter with exact mr , a filter with lowercase eq is failing")
+ #assert topology.standalone.db2index(bename=DEFAULT_BENAME, suffixes=None, attrs=['homeDirectory'])
+ #topology.standalone.start(timeout=10)
+ args = {TASK_WAIT: True}
+ topology.standalone.tasks.reindex(suffix=SUFFIX, attrname='homeDirectory', args=args)
+
+ log.info("Check indexing succeeded with a specified matching rule")
+ file_path = os.path.join(topology.standalone.prefix, "var/log/dirsrv/slapd-%s/errors" % topology.standalone.serverid)
+ file_obj = open(file_path, "r")
+
+ # Check if the MR configuration failure occurs
+ regex = re.compile("unknown or invalid matching rule")
+ while True:
+ line = file_obj.readline()
+ found = regex.search(line)
+ if ((line == '') or (found)):
+ break
+
+ if (found):
+ log.info("The configuration of a specific MR fails")
+ log.info(line)
+ assert 0
+
+def test_ticket48745_homeDirectory_mixed_value(topology):
+ # Set a homedirectory value with mixed case
+ name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
+ mod = [(ldap.MOD_REPLACE, 'homeDirectory', MIXED_VALUE)]
+ topology.standalone.modify_s(name, mod)
+
+def test_ticket48745_extensible_search_after_index(topology):
+ name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
+
+ # check with the exact stored value
+ log.info("Default: can retrieve an entry filter syntax with exact stored value")
+ ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory=%s)" % MIXED_VALUE)
+# log.info("attach debugger")
+# time.sleep(60)
+
+ # This search will fail because a
+ # subtree search with caseExactIA5Match will find a key
+ # where the value has been lowercase
+ log.info("Default: can retrieve an entry filter caseExactIA5Match with exact stored value")
+ ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory:caseExactIA5Match:=%s)" % MIXED_VALUE)
+ assert ent
+
+ # But do additional searches.. just for more tests
+ # check with a lower case value that is different from the stored value
+ log.info("Default: can not retrieve an entry filter syntax match with lowered stored value")
+ try:
+ ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory=%s)" % LOWER_VALUE)
+ assert ent is None
+ except ldap.NO_SUCH_OBJECT:
+ pass
+ log.info("Default: can not retrieve an entry filter caseExactIA5Match with lowered stored value")
+ try:
+ ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory:caseExactIA5Match:=%s)" % LOWER_VALUE)
+ assert ent is None
+ except ldap.NO_SUCH_OBJECT:
+ pass
+ log.info("Default: can retrieve an entry filter caseIgnoreIA5Match with lowered stored value")
+ ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory:caseIgnoreIA5Match:=%s)" % LOWER_VALUE)
+
+def test_ticket48745(topology):
+ """Write your testcase here...
+
+ Also, if you need any testcase initialization,
+ please, write additional fixture for that(include finalizer).
+ """
+
+ log.info('Test complete')
+
+
+if __name__ == '__main__':
+ # Run isolated
+ # -s for DEBUG mode
+# global installation1_prefix
+# installation1_prefix = None
+# topo = topology(True)
+# test_ticket48745_init(topo)
+#
+# test_ticket48745_homeDirectory_indexed_cis(topo)
+# test_ticket48745_homeDirectory_mixed_value(topo)
+# test_ticket48745_extensible_search_after_index(topo)
+
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48746_test.py b/dirsrvtests/tests/tickets/ticket48746_test.py
new file mode 100644
index 0000000..5ee0b9e
--- /dev/null
+++ b/dirsrvtests/tests/tickets/ticket48746_test.py
@@ -0,0 +1,213 @@
+import os
+import sys
+import time
+import ldap
+import logging
+#import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+from lib389.utils import *
+
+logging.getLogger(__name__).setLevel(logging.DEBUG)
+log = logging.getLogger(__name__)
+
+installation1_prefix = None
+
+NEW_ACCOUNT = "new_account"
+MAX_ACCOUNTS = 20
+
+MIXED_VALUE="/home/mYhOmEdIrEcToRy"
+LOWER_VALUE="/home/myhomedirectory"
+HOMEDIRECTORY_INDEX = 'cn=homeDirectory,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
+HOMEDIRECTORY_CN="homedirectory"
+MATCHINGRULE = 'nsMatchingRule'
+UIDNUMBER_INDEX = 'cn=uidnumber,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
+UIDNUMBER_CN="uidnumber"
+
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+ at pytest.fixture(scope="module")
+def topology(request):
+ global installation1_prefix
+ if installation1_prefix:
+ args_instance[SER_DEPLOYED_DIR] = installation1_prefix
More information about the Pkg-fedora-ds-maintainers
mailing list