Compare commits

..

58 commits

Author SHA1 Message Date
Viktor Ashirov
46ed18d4aa Bump version to 3.1.1 2024-10-30 13:36:27 +01:00
Viktor Ashirov
3e8872b4ad Bump version to 2.0.15 2022-03-24 10:10:14 +01:00
Viktor Ashirov
219443e4d8 Use Rust 2018 edition for concread 2022-01-25 16:15:27 +01:00
Viktor Ashirov
119caedb68 Bump version to 2.0.13 2022-01-25 12:10:14 +01:00
Viktor Ashirov
15457fb2f9 Bump version to 2.0.12 2021-12-17 10:18:11 +01:00
Viktor Ashirov
8d74cea740 Bump version to 2.0.11 2021-11-23 09:55:44 +01:00
Viktor Ashirov
eff994258c Use split perl dependencies only on Fedora >= 33 and RHEL >= 9
Resolves rhbz#2016595
2021-11-04 08:52:16 +01:00
Viktor Ashirov
6ec7cd6707 Bump version to 2.0.10 2021-10-07 15:17:56 +02:00
Viktor Ashirov
99b1ee4281 Bump version to 2.0.6 2021-06-24 11:33:05 +02:00
Viktor Ashirov
02c260e83f Bump version to 2.0.4
Switch testing to follow f34/2.0.x
2021-05-07 11:04:28 +02:00
Thierry Bordaz
3c11dc675a Bump version to 1.4.4.14
Issue 4671 - UI - Fix browser crashes
Issue 4229 - Fix Rust linking
Issue 4658 - monitor - connection start date is incorrect
Issue 4656 - Make replication CLI backwards compatible with role name change
Issue 4656 - Remove problematic language from UI/CLI/lib389
Issue 4459 - lib389 - Default paths should use dse.ldif if the server is down
Issue 4661 - RFE - allow importing openldap schemas (#4662)
Issue 4659 - restart after openldap migration to enable plugins (#4660)
Issue 4663 - CLI - unable to add objectclass/attribute without x-origin
Issue 4169 - UI - updates on the tuning page are not reflected in the UI
Issue 4588 - BUG - unable to compile without xcrypt (#4589)
Issue 4513 - Fix replication CI test failures (#4557)
Issue 4646 - CLI/UI - revise DNA plugin management
Issue 4644 - Large updates can reset the CLcache to the beginning of the changelog (#4647)
Issue 4649 - crash in sync_repl when a MODRDN create a cenotaph (#4652)
Issue 4513 - CI - make acl ip address tests more robust
Issue 4619 - remove pytest requirement from lib389
Issue 4615 - log message when psearch first exceeds max threads per conn
2021-03-22 08:56:38 +01:00
Alexander Bokovoy
c885a7fe00 Rebuild now that Dogtag is fixed to work with a fix to Issue 4609
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
2021-03-22 08:56:38 +01:00
Mark Reynolds
75c26298d4 Bump version to 1.4.4.13
Update dscontainer (#4564)
Issue 4591 - RFE - improve openldap_to_ds help and features (#4607)
Issue 4324 - Some architectures the cache line size file does not exist
Issue 4593 - RFE - Print help when nsSSLPersonalitySSL is not found (#4614)
Issue 4609 - CVE - info disclosure when authenticating
2021-03-22 08:56:38 +01:00
Mark Reynolds
7e0593339e Bump version to 1.4.4.12
Issue 4579 - libasan detects heap-use-after-free in URP test (#4584)
Issue 4563 - Failure on s390x: 'Fails to split RDN "o=pki-tomcat-CA" into components' (#4573)
Issue 4526 - sync_repl: when completing an operation in the pending list, it can select the wrong operation (#4553)
Issue 4396 - Minor memory leak in backend (#4558) (#4572)
Issue 4324 - Performance search rate: change entry cache monitor to recursive pthread mutex (#4569)
Issue 5442 - Search results are different between RHDS10 and RHDS11
2021-03-22 08:56:38 +01:00
Mark Reynolds
7280d45d0d Bump version to 1.4.4.11
Issue 4548 - CLI - dsconf needs better root DN access control plugin validation
Issue 4513 - Fix schema test and lib389 task module (#4514)
Issue 4535 - lib389 - Fix log function in backends.py
Issue 4534 - libasan read buffer overflow in filtercmp (#4541)
2021-03-22 08:56:38 +01:00
Mark Reynolds
bc3be30b44 Bump version to 1.4.4.10
Issue 4381 - RFE - LDAPI authentication DN rewritter
Issue 4539 - BUG - no such file if no overlays in openldap during migration (#4540)
Issue 4513 - CI Tests - fix test failures
Issue 4528 - Fix cn=monitor SCOPE_ONE search (#4529)
Issue 4535 - lib389 - healthcheck throws exception if backend is not replicated
Issue 4504 - insure that repl_monitor_test use ldapi (for RHEL) - fix merge issue (#4533)
Issue 4504 - Insure ldapi is enabled in repl_monitor_test.py (Needed on RHEL) (#4527)
Issue 4506 - BUG - Fix bounds on fd table population (#4520)
Issue 4521 - DS crash in deref plugin if dereferenced entry exists but is not returned by internal search (#4525)
Issue 4384 - Separate eventq into REALTIME and MONOTONIC
Issue 4418 - ldif2db - offline. Warn the user of skipped entries
Issue 4419 - Warn users of skipped entries during ldif2db online import (#4476)
Issue 4414 - disk monitoring - prevent division by zero crash
Issue 4507 - Improve csngen testing task (#4508)
Issue 4498 - BUG - entryuuid replication may not work (#4503)
Issue 4504 - Fix pytest test_dsconf_replication_monitor (#4505)
Issue 4480 - Unexpected info returned to ldap request (#4491)
Issue 4373 - BUG - one line cleanup, free results in mt if ent 0 (#4502)
Issue 4500 - Add cockpit enabling to dsctl
Issue 4272 - RFE - add support for gost-yescrypt for hashing passwords (#4497)
Issue 1795 - RFE - Enable logging for libldap and libber in error log (#4481)
Issue 4492 - Changelog cache can upload updates from a wrong starting point (CSN) (#4493)
Issue 4373 - BUG - calloc of size 0 in MT build (#4496)
Issue 4483 - heap-use-after-free in slapi_be_getsuffix
Issue 4224 - cleanup specfile after libsds removal
Issue 4421 - Unable to build with Rust enabled in closed environment
Issue 4229 - RFE - Improve rust linking and build performance (#4474)
Issue 4464 - RFE - clang with ds+asan+rust
Issue 4224 - openldap can become confused with entryuuid
Issue 4313 - improve tests and improve readme re refdel
Issue 4313 - fix potential syncrepl data corruption
Issue 4315 - performance search rate: nagle triggers high rate of setsocketopt (#4437)
Issue 4243 - Fix test (4th): SyncRepl plugin provides a wrong (#4475)
Issue 4446 - RFE - openldap password hashers
Issue 4403 - RFE - OpenLDAP pw hash migration tests (#4408)
Issue 4410  -RFE - ndn cache with arc in rust
Issue 4460 - BUG - add machine name to subject alt names in SSCA (#4472)
Issue 4243 - Fix test: SyncRepl plugin provides a wrong cookie (#4466) (#4466)
2021-03-22 08:56:32 +01:00
Viktor Ashirov
df9946086f Bump version to 1.4.4.9
Switch testing to follow f33/1.4.4.x
2020-12-01 10:24:19 +01:00
Mark Reynolds
87a9de63de Update sources 2020-10-25 22:32:26 +01:00
Mark Reynolds
168bbc548d Bump version to 1.4.3.13
Issue 4342 - UI - additional fixes for creation instance modal
Issue 3996 - Add dsidm rename option (#4338)
Issue 4258 - Add server version information to UI
Issue 4209 - RFE - add bootstrap credentials to repl agreement (UI update)
Issue 4209 - RFE - add bootstrap credentials to repl agreement (CLI update)
Issue 4209 - RFE - add bootstrap credentials to repl agreement
Issue 4319 - Performance search rate: listener may be erroneously waken up (#4323)
Ticket 51190 - SyncRepl plugin provides a wrong cookie
Ticket 51253 - dscreate should LDAPI to bootstrap the config
Ticket 51228 - Fix lock/unlock wording and lib389 use of methods
Ticket 51229 - Server Settings page gets into an unresponsive state
Ticket 51165 - Set the operation start time for extended ops
Ticket 51228 - Clean up dsidm user status command
Ticket 51233 - ds-replcheck crashes in offline mode
Ticket 50260 - Fix test according to #51222 fix
2020-10-25 22:32:21 +01:00
Mark Reynolds
5f02ce4d26 Bump version to 1.4.3.12
Issue 51222 - It should not be allowed to delete Managed Entry manually
Issue 51129 - SSL alert: The value of sslVersionMax "TLS1.3" is higher than the supported version
Issue 51086 - Fix instance name length for interactive install
Issue 51136 - JSON Error output has redundant messages
Issue 51059 - If dbhome directory is set online backup fails
Issue 51000 - Separate the BDB backend monitors
Issue 49300 - entryUSN is duplicated after memberOf operation
Issue 50984 - Fix disk_mon_check_diskspace types
2020-08-04 12:56:07 +02:00
Mark Reynolds
28897621ef Bump version to 1.4.3.11
Issue 51192 - Add option to reject internal unindexed searches
Issue 51159 - dsidm ou delete fails
Issue 51165 - add more logconv stats for the new access log keywords
Issue 51188 - db2ldif crashes when LDIF file can't be accessed
Issue 51165 - add new access log keywords for wtime and optime
Issue 50696 - Fix Allowed and Denied Ciphers lists - WebUI
Issue 51169 - UI - attr uniqueness - selecting empty subtree crashes cockpit
Issue 49256 - log warning when thread number is very different from autotuned value
Issue 51157 - Reindex task may create abandoned index file
Issue 51166 - Log an error when a search is fully unindexed
Issue 51161 - fix SLE15.2 install issps
Issue 51144 - dsctl fails with instance names that contain slapd-
Issue 50984 - Memory leaks in disk monitoring
Issue 50201 - nsIndexIDListScanLimit accepts any value
2020-08-04 12:56:07 +02:00
Mark Reynolds
5d28e52bbf Bump version to 1.4.3.10
Issue 49859 - A distinguished value can be missing in an entry
Issue 50791 - Healthcheck should look for notes=A/F in access log
Issue 51072 - Set the default minimum worker threads
Issue 50912 - pwdReset can be modified by a user
Issue 51100 - Correct numSubordinates value for cn=monitor
Issue 51136 - dsctl and dsidm do not errors correctly when using JSON
Issue 51132 - Winsync setting winSyncWindowsFilter not working as expected
Issue 51072 - improve autotune defaults
Issue 50746 - Add option to healthcheck to list all the lint reports
Issue 51118 - UI - improve modal validation when creating an instance
2020-06-22 13:30:24 +02:00
Mark Reynolds
fe5fb99c2e Bump version to 1.4.3.9
Issue 50931 - RFE AD filter rewriter for ObjectCategory
Issue 51113 - Allow using uid for replication manager entry
Issue 51095 - abort operation if CSN can not be generated
Issue 51110 - Fix ASAN ODR warnings
Issue 51102 - RFE - ds-replcheck - make online timeout configurable
Issue 51076 - remove unnecessary slapi entry dups
Issue 51086 - Improve dscreate instance name validation
Issue 50989 - ignore pid when it is ourself in protect_db
Issue 50499 - Fix some npm audit issues
Issue 51091 - healthcheck json report fails when mapping tree is deleted
Issue 51079 - container pid start and stop issues
Issue 50610 - Fix return code when it's nothing to free
Issue 51082 - abort when a empty valueset is freed
Issue 50610 - memory leaks in dbscan and changelog encryption
Issue 51076 - prevent unnecessarily duplication of the target entry
2020-06-04 22:37:08 +02:00
Mark Reynolds
1f11dc6813 Bump version to 1.4.3.8
Issue 51078 - Add nsslapd-enable-upgrade-hash to the schema
Issue 51054 - Revise ACI target syntax checking
Issue 51068 - deadlock when updating the schema
Issue 51060 - unable to set sslVersionMin to TLS1.0
Issue 51064 - Unable to install server where IPv6 is disabled
Issue 51051 - CLI fix consistency issues with confirmations
Issue 49731 - undo db_home_dir under /dev/shm/dirsrv for now
Issue 51054 - AddressSanitizer: heap-buffer-overflow in ldap_utf8prev
Issue 51047 - React deprecating ComponentWillMount
Issue 50499 - fix npm audit issues
Issue 50545 - Port dbgen.pl to dsctl
2020-06-04 22:37:08 +02:00
Mark Reynolds
6c6e7f994a Bump version to 1.4.3.7
Issue 51024 - syncrepl_entry callback does not contain attributes added by postoperation plugins
Issue 51035 - Heavy StartTLS connection load can randomly fail with err=1
Issue 49731 - undo db_home_dir under /dev/shm/dirsrv for now
Issue 51031 - UI - transition between two instances needs improvement
2020-06-04 22:37:08 +02:00
Mark Reynolds
77975b6368 Bump version to 1.4.3.6
Issue 50933 - 10rfc2307compat.ldif is not ready to set used by default
Issue 50931 - RFE AD filter rewriter for ObjectCategory
Issue 51016 - Fix memory leaks in changelog5_init and perfctrs_init
Issue 50980 - RFE extend usability for slapi_compute_add_search_rewriter and slapi_compute_add_evaluator
Issue 51008 - dbhome in containers
Issue 50875 - Refactor passwordUserAttributes's and passwordBadWords's code
Issue 51014 - slapi_pal.c possible static buffer overflow
Issue 50545 - remove dbmon "incr" option from arg parser
Issue 50545 - Port dbmon.sh to dsconf
Issue 51005 - AttributeUniqueness plugin's DN parameter should not have a default value
Issue 49731 - Fix additional issues with setting db home directory by default
Issue 50337 - Replace exec() with setattr()
Issue 50905 - intermittent SSL hang with rhds
Issue 50952 - SSCA lacks basicConstraint:CA
Issue 50640 - Database links: get_monitor() takes 1 positional argument but 2 were given
Issue 50869 - Setting nsslapd-allowed-sasl-mechanisms truncates the value
2020-06-04 22:37:08 +02:00
Mark Reynolds
d944854879 Bump version to 1.4.3.5
Issue 50994 - Fix latest UI bugs found by QE
Issue 50933 - rfc2307compat.ldif
Issue 50337 - Replace exec() with setattr()
Issue 50984 - Memory leaks in disk monitoring
Issue 50984 - Memory leaks in disk monitoring
Issue 49731 - dscreate fails in silent mode because of db_home_dir
Issue 50975 - Revise UI branding with new minimized build
Issue 49437 - Fix memory leak with indirect COS
Issue 49731 - Do not add db_home_dir to template-dse.ldif
Issue 49731 - set and use db_home_directory by default
Issue 50971 - fix BSD_SOURCE
Issue 50744 - -n option of dbverify does not work
Issue 50952 - SSCA lacks basicConstraint:CA
Issue 50976 - Clean up Web UI source directory from unused files
Issue 50955 - Fix memory leaks in chaining plugin(part 2)
Issue 50966 - UI - Database indexes not using typeAhead correctly
Issue 50974 - UI - wrong title in "Delete Suffix" popup
Issue 50972 - Fix cockpit plugin build
Issue 49761 - Fix CI test suite issues
Issue 50971 - Support building on FreeBSD.
Issue 50960 - [RFE] Advance options in RHDS Disk Monitoring Framework
Issue 50800 - wildcards in rootdn-allow-ip attribute are not accepted
Issue 50963 - We should bundle *.min.js files of Console
Issue 50860 - Port Password Policy test cases from TET to python3 Password grace limit section.
Issue 50860 - Port Password Policy test cases from TET to python3 series of bugs Port final
Issue 50954 - buildnum.py - fix date formatting issue
2020-04-02 11:24:55 +02:00
Mark Reynolds
2e89eb5dff Bump version to 1.4.3.4
Issue 50954 - Port buildnum.pl to python(part 2)
Issue 50955 - Fix memory leaks in chaining plugin
Issue 50954 - Port buildnum.pl to python
Issue 50947 - change 00core.ldif objectClasses for openldap migration
Issue 50755 - setting nsslapd-db-home-directory is overriding db_directory
Issue 50937 - Update CLI for new backend split configuration
Issue 50860 - Port Password Policy test cases from TET to python3 pwp.sh
Issue 50945 - givenname alias of gn from openldap
Issue 50935 - systemd override in lib389 for dscontainer
Issue 50499 - Fix npm audit issues
Issue 49761 - Fix CI test suite issues
Issue 50618 - clean compiler warning and log level
Issue 50889 - fix compiler issues
Issue 50884 - Health check tool DSEldif check fails
Issue 50926 - Remove dual spinner and other UI fixes
Issue 50928 - Unable to create a suffix with countryName
Issue 50758 - Only Recommend bash-completion, not Require
Issue 50923 - Fix a test regression
Issue 50904 - Connect All React Components And Refactor the Main Navigation Tab Code
Issue 50920 - cl-dump exit code is 0 even if command fails with invalid arguments
Issue 50923 - Add test - dsctl fails to remove instances with dashes in the name
Issue 50919 - Backend delete fails using dsconf
Issue 50872 - dsconf can't create GSSAPI replication agreements
Issue 50912 - RFE - add password policy attribute pwdReset
Issue 50914 - No error returned when adding an entry matching filters for a non existing automember group
Issue 50889 - Extract pem files into a private namespace
Issue 50909 - nsDS5ReplicaId cant be set to the old value it had before
Issue 50686 - Port fractional replication test cases from TET to python3 final
Issue 49845 - Remove pkgconfig check for libasan
Issue:50860 - Port Password Policy test cases from TET to python3 bug624080
Issue:50860 - Port Password Policy test cases from TET to python3 series of bugs
Issue 50786 - connection table freelist
Issue 50618 - support cgroupv2
Issue 50900 - Fix cargo offline build
Issue 50898 - ldclt core dumped when run with -e genldif option
2020-03-16 18:43:19 +01:00
Matus Honek
7f65eb5b0d Bring back the necessary c_rehash util
Resolves: #1803370
(cherry picked from commit 6befc19988)
2020-02-25 09:15:09 +01:00
Mark Reynolds
31ffbfb10f Bump version to 1.4.3.3-2
Remove unneeded perl dependencies
Change bash-completion to "Recommends" instead of "Requires"
2020-02-25 09:15:09 +01:00
Mark Reynolds
4b004b5dc3 Bump version to 1.4.3.3
Bump version to 1.4.3.3
Issue 50855 - remove unused file from UI
Issue 50855 - UI: Port Server Tab to React
Issue 49845 - README does not contain complete information on building
Issue 50686 - Port fractional replication test cases from TET to python3 part 1
Issue 49623 - cont cenotaph errors on modrdn operations
Issue 50882 - Fix healthcheck errors for instances that do not have TLS enabled
Issue 50886 - Typo in the replication debug message
Issue 50873 - Fix healthcheck and virtual attr check
Issue 50873 - Fix issues with healthcheck tool
Issue 50028 - Add a new CI test case
Issue 49946 - Add a new CI test case
Issue 50117 - Add a new CI test case
Issue 50787 - fix implementation of attr unique
Issue 50859 - support running only with ldaps socket
Issue 50823 - dsctl doesn't work with 'slapd-' in the instance name
Issue 49624 - cont - DB Deadlock on modrdn appears to corrupt database and entry cache
Issue 50867 - Fix minor buildsys issues
Issue 50737 - Allow building with rust online without vendoring
Issue 50831 - add cargo.lock to allow offline builds
Issue 50694 - import PEM certs on startup
Issue 50857 - Memory leak in ACI using IP subject
Issue 49761 - Fix CI test suite issues
Issue 50853 - Fix NULL pointer deref in config setting
Issue 50850 - Fix dsctl healthcheck for python36
Issue 49990 - Need to enforce a hard maximum limit for file descriptors
Issue 48707 - ldapssotoken for authentication
2020-02-25 09:15:09 +01:00
Viktor Ashirov
3d8422f2ba Use rawhide spec file for testing 2020-01-28 10:37:54 +01:00
Viktor Ashirov
a6fcb03fc6 Remove python3-packaging dependency 2020-01-28 10:10:50 +01:00
Viktor Ashirov
0eec4c2d2d Issue 50680 - Remove branding from upstream spec file 2020-01-28 09:35:48 +01:00
Viktor Ashirov
7fc074ecac Use an unversioned dependency on cockpit 2020-01-28 09:14:26 +01:00
Mark Reynolds
929c2d7a5b Bump version to 1.4.1.14
Issue 49254 - Fix compiler failures and warnings
Issue 50349 - additional fix: filter schema check must handle subtypes
Issue 50836 - Port Schema UI tab to React
Issue 50842 - Decrease 389-console Cockpit component size
Issue 50790 - Add result text when filter is invalid
Issue 50834 - Incorrectly setting the NSS default SSL version max
Issue 50829 - Disk monitoring rotated log cleanup causes heap-use-after-free
Issue 50709 - (cont) Several memory leaks reported by Valgrind for 389-ds 1.3.9.1-10
Issue 50599 - Fix memory leak when removing db region files
Issue 49395 - Set the default TLS version min to TLS1.2
Issue 50818 - dsconf pwdpolicy get error
Issue 50599 - Remove db region files prior to db recovery
Issue 50816 - dsconf allows the root password to be set to nothing
2020-01-23 17:22:01 -05:00
Mark Reynolds
f4286966d8 Bump version to 1.4.1.13
Issue 50545 - Add the new replication monitor functionality to UI
Issue 50806 - Fix minor issues in lib389 health checks
Issue 50754 - Add Restore Change Log option to CLI
Issue 50667 - dsctl -l did not respect PREFIX
Issue 50780 - More CLI fixes
Issue 50780 - Fix UI issues
Issue 50779 - lib389 - conflict compare fails for DN's with spaces
Issue 50499 - Fix npm audit issues
Issue 50758 - Need to enable CLI arg completion
Issue 50709 - Several memory leaks reported by Valgrind for 389-ds 1.3.9.1-10
2020-01-13 16:29:43 -05:00
Mark Reynolds
f3b5a6b874 Bump version to 1.4.1.12-2
Fix python-argcomplete tinkering
2019-12-09 16:08:56 -05:00
Mark Reynolds
c35689ffd1 Bump version to 1.4.1.12
Issue 50586 - lib389 - Fix DSEldif long line processing
2019-12-06 20:02:33 -05:00
Mark Reynolds
60c4af3a5a Bump version to 1.4.1.11
Issue 50499 - Fix npm audit issues
Issue 50753 - Dumping the changelog to a file doesn't work
Issue 50734 - lib389 creates non-SSCA cert DBs with misleading README.txt
Issue 50736 - RetroCL trimming may crash at shutdown if trimming configuration is invalid
Issue 50439 - Update docker integration for Fedora
Issue 50747 - Port readnsstate to dsctl
Issue 50745 - ns-slapd hangs during CleanAllRUV tests
Issue 50758 - Enable CLI arg completion
Issue 50701 - Fix type in lint report
Issue 50701 - Add additional healthchecks to dsconf
Issue 50711 - `dsconf security` lacks option for setting nsTLSAllowClientRenegotiation attribute
Issue 50499 - Fix npm audit issues
Issue 50634 - Fix CLI error parsing for non-string values
2019-12-06 17:11:21 -05:00
Mark Reynolds
40d91395ad Bump version to 1.4.1.10-2
Fix specfile dependancy for python packaging
2019-11-15 09:01:56 -05:00
Mark Reynolds
b96e1face7 Fix specfile from bad cherry-pick 2019-11-13 19:04:45 -05:00
Mark Reynolds
fc02847459 Update sources 2019-11-13 17:48:47 -05:00
Mark Reynolds
b1601d9c17 Bump version to 1.4.1.10
Issue 50712 - Version comparison doesn't work correctly on git builds
Issue 50706 - Missing lib389 dependency - packaging
Issue 50499 - Fix npm audit issues
Issue 50699 - Add Disk Monitor to CLI and UI
Issue 50716 - CVE-2019-14824 (BZ#1748199) - deref plugin displays restricted attributes
Issue 50696 - Fix various UI bugs
Issue 50689 - Failed db restore task does not report an error
2019-11-13 17:44:36 -05:00
Mark Reynolds
e42160d481 Bump version to 1.4.1.9
Issue 50592 - Port Replication Tab to ReactJS
Issue 49850 - cont -fix crash in ldbm_non_leaf
Issue 50634 - Clean up CLI errors output - Fix wrong exception
Issue 50634 - Clean up CLI errors output
Issue 49850 - ldbm_get_nonleaf_ids() slow for databases with many non-leaf entries
Issue 50655 - access log etime is not properly formatted
Issue 50653 - objectclass parsing fails to log error message text
Issue 50646 - Improve task handling during shutdowns
Issue 50622 - ds_selinux_enabled may crash on suse
Issue 50499 - Fix npm audit issues
2019-11-01 16:01:27 -04:00
Mark Reynolds
946c432a51 Bump version to 1.4.1.8-4
Remove perl filter provides/requires as its causes more regressions
2019-10-15 11:47:35 -04:00
Mark Reynolds
6caa815aaf Bump version to 1.4.1.8-3
Fix perl filter provides/requires
2019-09-27 17:33:44 -04:00
Mark Reynolds
36a556fb1d Revert perl filter 2019-09-26 12:16:06 -04:00
Mark Reynolds
360978ad9a Bump version to 1.4.1.8
Issue 50545 - Port repl-monitor.pl to lib389 CLI
Issue 50620 - Fix regressions from 50506 (slapi_enry_attr_get_ref)
2019-09-26 10:48:42 -04:00
Mark Reynolds
ce16f0d5bd Bump version to 1.4.1.7
Issue 50581 - ns-slapd crashes during ldapi search
Issue 50604 - Fix UI validation
Issue 50593 - Investigate URP handling on standalone instance
Issue 50506 - Fix regression for relication stripattrs
Issue 50546 - fix more UI issues(part 2)
Issue 50546 - fix more UI issues
Issue 50546 - Fix various issues in UI
Issue 50576 - Same proc uid/gid maps to rootdn for ldapi sasl
Issue 50567, 50568 - strict host check disable and display container version
Issue 50550 - DS installer debug messages leaking to ipa-server-install
Issue 50545 - Port fixup-memberuid and add the functionality to CLI and UI
Issue 50572 - After running cl-dump dbdir/cldb/*ldif.done are not deleted
Issue 50578 - Add SKIP_AUDIT_CI flag for Cockpit builds
Issue 50349 - filter schema validation
Issue 48055 - CI test-(Plugin configuration should throw proper error messages if not configured properly)
Issue 49324 - idl_new fix assert
Issue 50564 - Fix rust libraries by default and improve docker
Issue 50206 - Refactor lock, unlock and status of dsidm account/role
Issue 49324 - idl_new report index name in error conditions
Issue 49761 - Fix CI test suite issues
Issue 50506 - Fix regression from slapi_entry_attr_get_ref refactor
Issue 50499 - Audit fix - Update npm 'eslint-utils' version
Issue 49624 - modrdn silently fails if DB deadlock occurs
Issue 50542 - fix crash in filter tests
Issue 49761 - Fix CI test suite issues
Issue 50542 - Entry cache contention during base search
Issue 50462 - Fix CI tests
Issue 50490 - objects and memory leaks
Issue 50538 - Move CI test to individual file
Issue 50538 - cleanAllRUV task limit is not enforced for replicated tasks
Issue 50536 - Audit log heading written to log after every update
Issue 50525 - nsslapd-defaultnamingcontext does not change when the assigned suffix gets deleted
Issue 50534 - CLI change schema edit subcommand to replace
Issue 50506 - cont Fix invalid frees from pointer reference calls
Issue 50507 - Fix Cockpit UI styling for PF4
Issue 48851 - investigate and port TET matching rules filter tests(indexing final)
Issue 48851 - Add more test cases to the match test suite(mode replace)
Issue 50530 - Directory Server not RFC 4511 compliant with requested attr "1.1"
Issue 50529 - LDAP server returning PWP controls in different sequence
Issue 50506 - Fix invalid frees from pointer reference calls.
Issue 50506 - Replace slapi_entry_attr_get_charptr() with slapi_entry_attr_get_ref()
Issue 50521 - Add regressions in CI tests
Issue 50510 - etime can contain invalid nanosecond value
Issue 50488 - Create a monitor for disk space usagedisk-space-mon
Issue 50511 - lib389 PosixGroups type can not handle rdn properly
Issue 50508 - UI - fix local password policy form
2019-09-17 11:47:45 -04:00
Mark Reynolds
ff2286fd78 Bump version to 1.4.1.6
Issue 50355 - SSL version min and max not correctly applied
Issue 50497 - Port cl-dump.pl tool to Python using lib389
Issue 48851 - investigate and port TET matching rules filter tests(Final)
Issue 50417 - fix regression from previous commit
Issue 50425 - Add jemalloc LD_PRELOAD to systemd drop-in file
Issue 50325 - Add Security tab to UI
Issue 49789 - By default, do not manage unhashed password
Issue 49421 - Implement password hash upgrade on bind.
Issue 49421 - on bind password upgrade proof of concept
Issue 50493 - connection_is_free to trylock
Issue 50459 - Correct issue with allocation state
Issue 50499 - Fix audit issues and remove jquery from the whitelist
Issue 50459 - c_mutex to use pthread_mutex to allow ns sharing
Issue 50484 - Add a release build dockerfile and dscontainer improvements
Issue 50486 - Update jemalloc to 5.2.0
2019-07-19 11:40:53 -04:00
Mark Reynolds
88ff3453b3 Update sources 2019-07-08 16:04:35 -04:00
Mark Reynolds
29dec076f9 Bump version to 1.4.1.5
Issue 50431 - Fix regression from coverity fix (crash in memberOf plugin)
Issue 49239 - Add a new CI test case
Issue 49997 - Add a new CI test case
Issue 50177 - Add a new CI test case, also added fixes in lib389
Issue 49761 - Fix CI test suite issues
Issue 50474 - Unify result codes for add and modify of repl5 config
Issue 50472 - memory leak with encryption
Issue 50462 - Fix Root DN access control plugin CI tests
Issue 50462 - Fix CI tests
Issue 50217 - Implement dsconf security section
Issue 48851 - Add more test cases to the match test suite.
Issue 50378 - ACI's with IPv4 and IPv6 bind rules do not work for IPv6 clients
Issue 50439 - fix waitpid issue when pid does not exist
Issue 50454 - Fix Cockpit UI branding
Issue 48851 - investigate and port TET matching rules filter tests(index)
Issue 49232 - Truncate the message when buffer capacity is exceeded
2019-07-08 15:55:20 -04:00
Mark Reynolds
68027779f3 Add missing jemalloc source 2019-06-18 17:01:52 -04:00
Mark Reynolds
361dae830f Bump version to 1.4.1.4
Issue 49361 - Use IPv6 friendly network functions
Issue 48851 - Investigate and port TET matching rules filter tests(bug772777)
Issue 50446 - NameError: name 'ds_is_older' is not defined
Issue 49602 - Revise replication status messages
Issue 50439 - Update docker integration to work out of source directory
Issue 50037 - revert path changes as it breaks prefix/rpm builds
Issue 50431 - Fix regression from coverity fix
Issue 50370 - CleanAllRUV task crashing during server shutdown
Issue 48851 - investigate and port TET matching rules filter tests(match)
Issue 50417 - Fix missing quote in some legacy tools
Issue 50431 - Fix covscan warnings
Revert "Issue 49960 - Core schema contains strings instead of numer oids"
Issue 50426 - nsSSL3Ciphers is limited to 1024 characters
Issue 50052 - Fix rpm.mk according to audit-ci change
Issue 50365 - PIDFile= references path below legacy directory /var/run/
Issue 50428 - Log the actual base DN when the search fails with "invalid attribute request"
Issue 50329 - (2nd) Possible Security Issue: DOS due to ioblocktimeout not applying to TLS
Issue 50417 - Revise legacy tool scripts to work with new systemd changes
Issue 48851 - Add more search filters to vfilter_simple test suite
Issue 49761 - Fix CI test suite issues
Issue 49875 - Move SystemD service config to a drop-in file
Issue 50413 - ds-replcheck - Always display the Result Summary
Issue 50052 - Add package-lock.json and use "npm ci"
Issue 48851 - investigate and port TET matching rules filter tests(vfilter simple)
Issue 50355 -  NSS can change the requested SSL min and max versions
Issue 48851 - investigate and port TET matching rules filter tests(vfilter_ld)
Issue 50390 - Add Managed Entries Plug-in Config Entry schema
Issue 49730 - Remove unused Mozilla ldapsdk variables
2019-06-18 17:01:34 -04:00
Mark Reynolds
8c447d0eb9 Bump version to 1.4.1.3
Issue 49761 - Fix CI test suite issues
Issue 50041 - Add the rest UI Plugin tabs - Part 2
Issue 50340 - 2nd try - structs for diabled plugins will not be freed
Issue 50403 - Instance creation fails on 1.3.9 using perl utils and latest lib389
Issue 50389 - ns-slapd craches while two threads are polling the same connection
Issue 48851 - investigate and port TET matching rules filter tests(scanlimit)
Issue 50037 - lib389 fails to install in venv under non-root user
Issue 50112 - Port ACI test suit from TET to python3(userattr)
Issue 50393 - maxlogsperdir accepting negative values
Issue 50112 - Port ACI test suit from TET to python3(roledn)
Issue 49960 - Core schema contains strings instead of numer oids
Issue 50396 - Crash in PAM plugin when user does not exist
Issue 50387 - enable_tls() should label ports with ldap_port_t
Issue 50390 - Add Managed Entries Plug-in Config Entry schema
Issue 50306 - Fix regression with maxbersize
Issue 50384 - Missing dependency: cracklib-dicts
Issue 49029 - [RFE] improve internal operations logging
Issue 49761 - Fix CI test suite issues
Issue 50374 - dsdim posixgroup create fails with ERROR
Issue 50251 - clear text passwords visable in CLI verbose mode logging
Issue 50378 - ACI's with IPv4 and IPv6 bind rules do not work for IPv6 clients
Issue 48851 - investigate and port TET matching rules filter tests
Issue 50220 - attr_encryption test suite failing
Issue 50370 -  CleanAllRUV task crashing during server shutdown
Issue 50340 - structs for disabled plugins will not be freed
Issue 50164 - Add test for dscreate to basic test suite
Issue 50363 - ds-replcheck incorrectly reports error out of order multi-valued attributes
Issue 49730 - MozLDAP bindings have been unsupported for a while
Issue 50353 - Categorize tests by tiers
Issue 50303 - Add creation date to task data
Issue 50358 -  Create a Bitwise Plugin class in plugins.py
Remove the nss3 path prefix from the cert.h C preprocessor source file inclusion
Issue 50329 - revert fix
Issue 50112 - Port ACI test suit from TET to python3(keyaci)
Issue 50344 - tidy rpm vs build systemd flag handling
Issue 50067 - Fix krb5 dependency in a specfile
Issue 50340 - structs for diabled plugins will not be freed
Issue 50327 - Add replication conflict support to UI
Issue 50327 - Add replication conflict entry support to lib389/CLI
Issue 50329 - improve connection default parameters
Issue 50313 - Add a NestedRole type to lib389
Issue 50112 - Port ACI test suit from TET to python3(Delete and  Add)
Issue 49390, 50019 - support cn=config compare operations
Issue 50041 - Add the rest UI Plugin tabs - Part 1
Issue 50329 - Possible Security Issue: DOS due to ioblocktimeout not applying to TLS
Issue 49990 - Increase the default FD limits
Issue 50306 - (cont typo) Move connection config inside struct
Issue 50291 - Add monitor tab functionality to Cockpit UI
Issue 50317 - fix ds-backtrace issue on latest gdb
Issue 50305 - Revise CleanAllRUV task restart process
Issue 49915 - Fix typo
Issue 50026 - Audit log does not capture the operation where nsslapd-lookthroughlimit is modified
Issue 49899 - fix pin.txt and pwdfile permissions
Issue 49915 - Add regression test
Issue 50303 - Add task creation date to task data
Issue 50306 - Move connection config inside struct
Issue 50240 - Improve task logging
Issue 50032 - Fix deprecation warnings in tests
Issue 50310 - fix sasl header include
Issue 49390 - improve compare and cn=config compare tests
2019-05-24 15:18:10 -04:00
Mark Reynolds
31ccc3a0fa Bump version to 1.4.1.2-2
Fix lib389 python requirement
2019-03-29 20:22:43 -04:00
Mark Reynolds
b4f8bab9e1 Bump version to 1.4.1.2-1
Ticket 50308 - Revise memory leak fix
Ticket 50308 - Fix memory leaks for repeat binds and replication
Ticket 40067 - Use PKG_CHECK_MODULES to detect libraries
Ticket 49873 - (cont 3rd) cleanup debug log
Ticket 49873 - (cont 2nd) Contention on virtual attribute lookup
Ticket 50292 - Fix Plugin CLI and UI issues
Ticket 50112 - Port ACI test suit from TET to python3(misc and syntax)
Ticket 50289 - Fix various database UI issues
Ticket 49463 - After cleanALLruv, replication is looping on keep alive DEL
Ticket 50300 - Fix memory leak in automember plugin
Ticket 50265 - the warning about skew time could last forever
Ticket 50260 - Invalid cache flushing improvements
Ticket 49561 - MEP plugin, upon direct op failure, will delete twice the same managed entry
Ticket 50077 - Do not automatically turn automember postop modifies on
Ticket 50282 - OPERATIONS ERROR when trying to delete a group with automember members
Ticket 49715 - extend account functionality
Ticket 49873 - (cont) Contention on virtual attribute lookup
Ticket 50260 - backend txn plugins can corrupt entry cache
Ticket 50255 - Port password policy test to use DSLdapObject
Ticket 49667 - 49668 - remove old spec files
Ticket 50276 - 389-ds-console is not built on RHEL8 if cockpit_dist is already present
Ticket 50112 - Port ACI test suit from TET to python3(Search)
Ticket 50259 - implement dn construction test
Ticket 50273 - reduce default replicaton agmt timeout
Ticket 50208 - lib389- Fix issue with list all instances
Ticket 50112 - Port ACI test suit from TET to python3(Global Group)
Ticket 50041 - Add CLI functionality for special plugins
Ticket 50263 - LDAPS port not listening after installation
Ticket 49575 - Indicate autosize value errors and corrective actions
Ticket 50137 - create should not check in non-stateful mode for exist
Ticket 49655 - remove doap file
Ticket 50197 - Fix dscreate regression
Ticket 50234 - one level search returns not matching entry
Ticket 50257 - lib389 - password policy user vs subtree checks are broken
Ticket 50253 -  Making an nsManagedRoleDefinition type in src/lib389/lib389/idm/nsrole.py
Ticket 49029 - [RFE] improve internal operations logging
Ticket 50230 - improve ioerror msg when not root/dirsrv
Ticket 50246 - Fix the regression in old control tools
Ticket 50197 - Container integration part 2
Ticket 50197 - Container init tools
Ticket 50232 - export creates not importable ldif file
Ticket 50215 - UI - implement Database Tab in reachJS
Ticket 50243 - refint modrdn stress test
Ticket 50238 - Failed modrdn can corrupt entry cache
Ticket 50236 - memberOf should be more robust
Ticket 50213 - fix list instance issue
Ticket 50219 - Add generic filter to DSLdapObjects
Ticket 50227 - Making an cosClassicDefinition type in src/lib389/lib389/cos.py
Ticket 50112 - Port ACI test suit from TET to python3(modify)
Ticket 50224 - warnings on deprecated API usage
Ticket 50112 - Port ACI test suit from TET to python3(valueaci)
Ticket 50112 - Port ACI test suit from TET to python3(Aci Atter)
Ticket 50208 - make instances mark off based on dse.ldif not sysconfig
Ticket 50170 - composable object types for nsRole in lib389
Ticket 50199 - disable perl by default
Ticket 50211 - Making an actual Anonymous type in lib389/idm/account.py
Ticket 50155 - password history check has no way to just check the current password
Ticket 49873 - Contention on virtual attribute lookup
Ticket 50197 - Container integration improvements
Ticket 50195 - improve selinux error messages in interactive
Ticket 49658 - In replicated topology a single-valued attribute can diverge
Ticket 50111 - Use pkg-config to detect icu
Ticket 50165 - Fix issues with dscreate
Ticket 50177 - import task should not be deleted too rapidely after import finishes to be able to query the status
Ticket 50140 - Use high ports in container installs
Ticket 50184 - Add cli tool parity to dsconf/dsctl
Ticket 50159 - sssd and config display
2019-03-29 17:18:42 -04:00
10 changed files with 481 additions and 1867 deletions

232
.gitignore vendored
View file

@ -1,4 +1,232 @@
*~
/389-ds-base-*.tar.bz2
/jemalloc-*.tar.bz2
/389-ds-base-1.2.7.2.tar.bz2
/389-ds-base-1.2.7.3.tar.bz2
/389-ds-base-1.2.7.4.tar.bz2
/389-ds-base-1.2.7.5.tar.bz2
/389-ds-base-1.2.8.a1.tar.bz2
/389-ds-base-1.2.8.a2.tar.bz2
/389-ds-base-1.2.8.a3.tar.bz2
/389-ds-base-1.2.8.rc1.tar.bz2
/389-ds-base-1.2.8.rc2.tar.bz2
/389-ds-base-1.2.8.rc4.tar.bz2
/389-ds-base-1.2.8.rc5.tar.bz2
/389-ds-base-1.2.8.0.tar.bz2
/389-ds-base-1.2.8.1.tar.bz2
/389-ds-base-1.2.8.2.tar.bz2
/389-ds-base-1.2.8.3.tar.bz2
/389-ds-base-1.2.9.a1.tar.bz2
/389-ds-base-1.2.9.a2.tar.bz2
/389-ds-base-1.2.9.0.tar.bz2
/389-ds-base-1.2.9.1.tar.bz2
/389-ds-base-1.2.9.2.tar.bz2
/389-ds-base-1.2.9.3.tar.bz2
/389-ds-base-1.2.9.4.tar.bz2
/389-ds-base-1.2.9.5.tar.bz2
/389-ds-base-1.2.9.6.tar.bz2
/389-ds-base-1.2.9.7.tar.bz2
/389-ds-base-1.2.9.8.tar.bz2
/389-ds-base-1.2.9.9.tar.bz2
/389-ds-base-1.2.9.10.tar.bz2
/389-ds-base-1.2.10.a1.tar.bz2
/389-ds-base-1.2.10.a2.tar.bz2
/389-ds-base-1.2.10.a3.tar.bz2
/389-ds-base-1.2.10.a4.tar.bz2
/389-ds-base-1.2.10.a5.tar.bz2
/389-ds-base-1.2.10.a6.tar.bz2
/389-ds-base-1.2.10.a7.tar.bz2
/389-ds-base-1.2.10.a8.tar.bz2
/389-ds-base-1.2.10.rc1.tar.bz2
/389-ds-base-1.2.10.0.tar.bz2
/389-ds-base-1.2.10.1.tar.bz2
/389-ds-base-1.2.10.2.tar.bz2
/389-ds-base-1.2.10.3.tar.bz2
/389-ds-base-1.2.10.4.tar.bz2
/389-ds-base-1.2.11.a1.tar.bz2
/389-ds-base-1.2.11.1.tar.bz2
/389-ds-base-1.2.11.2.tar.bz2
/389-ds-base-1.2.11.3.tar.bz2
/389-ds-base-1.2.11.4.tar.bz2
/389-ds-base-1.2.11.5.tar.bz2
/389-ds-base-1.2.11.6.tar.bz2
/389-ds-base-1.2.11.7.tar.bz2
/389-ds-base-1.2.11.8.tar.bz2
/389-ds-base-1.2.11.9.tar.bz2
/389-ds-base-1.2.11.10.tar.bz2
/389-ds-base-1.2.11.11.tar.bz2
/389-ds-base-1.2.11.12.tar.bz2
/389-ds-base-1.2.11.13.tar.bz2
/389-ds-base-1.2.11.14.tar.bz2
/389-ds-base-1.2.11.15.tar.bz2
/389-ds-base-1.3.0.a1.tar.bz2
/389-ds-base-1.3.0.rc1.tar.bz2
/389-ds-base-1.3.0.rc2.tar.bz2
/389-ds-base-1.3.0.rc3.tar.bz2
/389-ds-base-1.3.0.0.tar.bz2
/389-ds-base-1.3.0.1.tar.bz2
/389-ds-base-1.3.0.2.tar.bz2
/389-ds-base-1.3.0.3.tar.bz2
/389-ds-base-1.3.0.4.tar.bz2
/389-ds-base-1.3.0.5.tar.bz2
/389-ds-base-1.3.1.0.tar.bz2
/389-ds-base-1.3.1.1.tar.bz2
/389-ds-base-1.3.1.2.tar.bz2
/389-ds-base-1.3.1.3.tar.bz2
/389-ds-base-1.3.1.4.tar.bz2
/389-ds-base-1.3.1.5.tar.bz2
/389-ds-base-1.3.1.6.tar.bz2
/389-ds-base-1.3.1.7.tar.bz2
/389-ds-base-1.3.1.8.tar.bz2
/389-ds-base-1.3.1.9.tar.bz2
/389-ds-base-1.3.1.10.tar.bz2
/389-ds-base-1.3.1.11.tar.bz2
/389-ds-base-1.3.2.0.tar.bz2
/389-ds-base-1.3.2.1.tar.bz2
/389-ds-base-1.3.2.2.tar.bz2
/389-ds-base-1.3.2.3.tar.bz2
/389-ds-base-1.3.2.4.tar.bz2
/389-ds-base-1.3.2.5.tar.bz2
/389-ds-base-1.3.2.6.tar.bz2
/389-ds-base-1.3.2.7.tar.bz2
/389-ds-base-1.3.2.8.tar.bz2
/389-ds-base-1.3.2.9.tar.bz2
/389-ds-base-1.3.2.10.tar.bz2
/389-ds-base-1.3.2.11.tar.bz2
/389-ds-base-1.3.2.12.tar.bz2
/389-ds-base-1.3.2.13.tar.bz2
/389-ds-base-1.3.2.14.tar.bz2
/389-ds-base-1.3.2.15.tar.bz2
/389-ds-base-1.3.2.16.tar.bz2
/389-ds-base-1.3.2.17.tar.bz2
/389-ds-base-1.3.2.18.tar.bz2
/389-ds-base-1.3.2.19.tar.bz2
/389-ds-base-1.3.2.20.tar.bz2
/389-ds-base-1.3.2.21.tar.bz2
/389-ds-base-1.3.2.22.tar.bz2
/389-ds-base-1.3.2.23.tar.bz2
/389-ds-base-1.3.3.0.tar.bz2
/389-ds-base-1.3.3.2.tar.bz2
/389-ds-base-1.3.3.3.tar.bz2
/389-ds-base-1.3.3.4.tar.bz2
/389-ds-base-1.3.3.5.tar.bz2
/389-ds-base-1.3.3.6.tar.bz2
/389-ds-base-1.3.3.7.tar.bz2
/389-ds-base-1.3.3.8.tar.bz2
/389-ds-base-1.3.3.9.tar.bz2
/389-ds-base-1.3.3.10.tar.bz2
/389-ds-base-1.3.3.11.tar.bz2
/389-ds-base-1.3.3.12.tar.bz2
/389-ds-base-1.3.4.0.tar.bz2
/nunc-stans-0.1.3.tar.bz2
/nunc-stans-0.1.4.tar.bz2
/389-ds-base-1.3.4.1.tar.bz2
/nunc-stans-0.1.5.tar.bz2
/389-ds-base-1.3.4.2.tar.bz2
/389-ds-base-1.3.4.3.tar.bz2
/389-ds-base-1.3.4.4.tar.bz2
/389-ds-base-1.3.4.5.tar.bz2
/389-ds-base-1.3.4.6.tar.bz2
/389-ds-base-1.3.4.7.tar.bz2
/389-ds-base-1.3.4.8.tar.bz2
/389-ds-base-1.3.5.0.tar.bz2
/nunc-stans-0.1.8.tar.bz2
/389-ds-base-1.3.5.1.tar.bz2
/389-ds-base-1.3.5.3.tar.bz2
/389-ds-base-1.3.5.4.tar.bz2
/389-ds-base-1.3.5.5.tar.bz2
/389-ds-base-1.3.5.6.tar.bz2
/389-ds-base-1.3.5.10.tar.bz2
/389-ds-base-1.3.5.11.tar.bz2
/389-ds-base-1.3.5.12.tar.bz2
/389-ds-base-1.3.5.13.tar.bz2
/389-ds-base-1.3.5.14.tar.bz2
/nunc-stans-0.2.0.tar.bz2
/389-ds-base-1.3.6.1.tar.bz2
/389-ds-base-1.3.6.2.tar.bz2
/389-ds-base-1.3.6.3.tar.bz2
/389-ds-base-1.3.6.4.tar.bz2
/389-ds-base-1.3.6.5.tar.bz2
/389-ds-base-1.3.6.6.tar.bz2
/389-ds-base-1.3.7.1.tar.bz2
/389-ds-base-1.3.7.2.tar.bz2
/389-ds-base-1.3.7.3.tar.bz2
/389-ds-base-1.3.7.4.tar.bz2
/389-ds-base-1.4.0.0.tar.bz2
/389-ds-base-1.4.0.1.tar.bz2
/389-ds-base-1.4.0.2.tar.bz2
/389-ds-base-1.4.0.3.tar.bz2
/389-ds-base-1.4.0.4.tar.bz2
/389-ds-base-1.4.0.5.tar.bz2
/389-ds-base-1.4.0.6.tar.bz2
/389-ds-base-1.4.0.7.tar.bz2
/389-ds-base-1.4.0.8.tar.bz2
/389-ds-base-1.4.0.9.tar.bz2
/389-ds-base-1.4.0.10.tar.bz2
/jemalloc-5.0.1.tar.bz2
/389-ds-base-1.4.0.11.tar.bz2
/jemalloc-5.1.0.tar.bz2
/389-ds-base-1.4.0.12.tar.bz2
/389-ds-base-1.4.0.13.tar.bz2
/389-ds-base-1.4.0.14.tar.bz2
/389-ds-base-1.4.0.15.tar.bz2
/389-ds-base-1.4.0.16.tar.bz2
/389-ds-base-1.4.0.17.tar.bz2
/389-ds-base-1.4.0.18.tar.bz2
/389-ds-base-1.4.0.19.tar.bz2
/389-ds-base-1.4.0.20.tar.bz2
/389-ds-base-1.4.1.1.tar.bz2
/389-ds-base-1.4.1.2.tar.bz2
/389-ds-base-1.4.1.3.tar.bz2
/389-ds-base-1.4.1.4.tar.bz2
/389-ds-base-1.4.1.5.tar.bz2
/jemalloc-5.2.0.tar.bz2
/389-ds-base-1.4.1.6.tar.bz2
/389-ds-base-1.4.2.1.tar.bz2
/389-ds-base-1.4.2.2.tar.bz2
/389-ds-base-1.4.2.3.tar.bz2
/389-ds-base-1.4.2.4.tar.bz2
/389-ds-base-1.4.2.5.tar.bz2
/389-ds-base-1.4.3.1.tar.bz2
/jemalloc-5.2.1.tar.bz2
/389-ds-base-1.4.3.2.tar.bz2
/389-ds-base-1.4.3.3.tar.bz2
/389-ds-base-1.4.3.4.tar.bz2
/389-ds-base-1.4.3.5.tar.bz2
/389-ds-base-1.4.4.0.tar.bz2
/389-ds-base-1.4.4.1.tar.bz2
/389-ds-base-1.4.4.2.tar.bz2
/389-ds-base-1.4.4.3.tar.bz2
/389-ds-base-1.4.4.4.tar.bz2
/389-ds-base-1.4.4.6.tar.bz2
/389-ds-base-1.4.5.0.tar.bz2
/389-ds-base-2.0.1.tar.bz2
/389-ds-base-2.0.2.tar.bz2
/389-ds-base-2.0.3.tar.bz2
/389-ds-base-2.0.4.tar.bz2
/389-ds-base-2.0.4.3.tar.bz2
/389-ds-base-2.0.5.tar.bz2
/389-ds-base-2.0.6.tar.bz2
/389-ds-base-2.0.7.tar.bz2
/389-ds-base-2.0.10.tar.bz2
/389-ds-base-2.0.11.tar.bz2
/389-ds-base-2.0.12.tar.bz2
/389-ds-base-2.0.13.tar.bz2
/389-ds-base-2.1.0.tar.bz2
/389-ds-base-2.2.0.tar.bz2
/389-ds-base-2.1.1.tar.bz2
/jemalloc-5.3.0.tar.bz2
/389-ds-base-2.2.1.tar.bz2
/389-ds-base-2.2.2.tar.bz2
/389-ds-base-2.3.0.tar.bz2
/389-ds-base-2.3.1.tar.bz2
/389-ds-base-2.3.2.tar.bz2
/389-ds-base-2.4.0.tar.bz2
/389-ds-base-2.4.1.tar.bz2
/389-ds-base-2.4.2.tar.bz2
/389-ds-base-2.4.3.tar.bz2
/389-ds-base-2.4.4.tar.bz2
/389-ds-base-2.4.5.tar.bz2
/389-ds-base-3.0.1.tar.bz2
/389-ds-base-3.0.2.tar.bz2
/389-ds-base-3.1.0.tar.bz2
/libdb-5.3.28-59.tar.bz2
/389-ds-base-3.1.1.tar.bz2

View file

@ -0,0 +1,48 @@
From 145e7f4aa9d9cf400751a16768b077b533f428cc Mon Sep 17 00:00:00 2001
From: tbordaz <tbordaz@redhat.com>
Date: Wed, 9 Oct 2024 15:20:48 +0200
Subject: [PATCH] Issue 6356 - On LMDB, after an update the impact VLV index,
the vlv recno cache is not systematically cleared (#6357)
Bug description:
The VLV manages/uses an index database.
In LMDB in addition to the index there is one 'recno cache' database per VLV index.
This recno cache, related to a given VLV index, is cleared when an update impacts the VLV index.
The recno cache is not systematically cleared upon update of the VLV index.
The way to clear the cache is to delete the record with key "OK".
When the 'recno cache' does not contain this key, the next
lookup to the cache, clears all entries and rebuild the cache
from the vlv index.
The deletion is done with mdb_del with both KEY and DATA
refering to the same mdb_val. This means it deletes the records
matching if both KEY/DATA.
It should not match the DATA as the "OK" record is just
a flag and all entries with that key should be removed.
Fix description:
The fix consist to call mdb_del only with key
fixes: #6356
Reviewed by: Pierre Rogier (Thanks!!)
---
ldap/servers/slapd/back-ldbm/db-mdb/mdb_layer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/back-ldbm/db-mdb/mdb_layer.c b/ldap/servers/slapd/back-ldbm/db-mdb/mdb_layer.c
index 9c2db199c..313eb35ae 100644
--- a/ldap/servers/slapd/back-ldbm/db-mdb/mdb_layer.c
+++ b/ldap/servers/slapd/back-ldbm/db-mdb/mdb_layer.c
@@ -2882,7 +2882,7 @@ dbmdb_public_clear_vlv_cache(Slapi_Backend *be, dbi_txn_t *txn, dbi_db_t *db)
ok.mv_size = 2;
rc = dbmdb_open_dbi_from_filename(&rcdbi, be, rcdbname, NULL, 0);
if (rc == 0) {
- rc = MDB_DEL(TXN(txn), rcdbi->dbi, &ok, &ok);
+ rc = MDB_DEL(TXN(txn), rcdbi->dbi, &ok, NULL);
}
slapi_ch_free_string(&rcdbname);
return rc;
--
2.46.0

View file

@ -1,318 +0,0 @@
From 1c9c535888b9a850095794787d67900b04924a76 Mon Sep 17 00:00:00 2001
From: tbordaz <tbordaz@redhat.com>
Date: Wed, 7 Jan 2026 11:21:12 +0100
Subject: [PATCH] Issue 7096 - During replication online total init the
function idl_id_is_in_idlist is not scaling with large database (#7145)
Bug description:
During a online total initialization, the supplier sorts
the candidate list of entries so that the parents are sent before
children entries.
With large DB the ID array used for the sorting is not
scaling. It takes so long to build the candidate list that
the connection gets closed
Fix description:
Instead of using an ID array, uses a list of ID ranges
fixes: #7096
Reviewed by: Mark Reynolds, Pierre Rogier (Thanks !!)
---
ldap/servers/slapd/back-ldbm/back-ldbm.h | 12 ++
ldap/servers/slapd/back-ldbm/idl_common.c | 163 ++++++++++++++++++
ldap/servers/slapd/back-ldbm/idl_new.c | 30 ++--
.../servers/slapd/back-ldbm/proto-back-ldbm.h | 3 +
4 files changed, 189 insertions(+), 19 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/back-ldbm.h b/ldap/servers/slapd/back-ldbm/back-ldbm.h
index 1bc36720d..b187c26bc 100644
--- a/ldap/servers/slapd/back-ldbm/back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/back-ldbm.h
@@ -282,6 +282,18 @@ typedef struct _idlist_set
#define INDIRECT_BLOCK(idl) ((idl)->b_nids == INDBLOCK)
#define IDL_NIDS(idl) (idl ? (idl)->b_nids : (NIDS)0)
+/*
+ * used by the supplier during online total init
+ * it stores the ranges of ID that are already present
+ * in the candidate list ('parentid>=1')
+ */
+typedef struct IdRange {
+ ID first;
+ ID last;
+ struct IdRange *next;
+} IdRange_t;
+
+
typedef size_t idl_iterator;
/* small hashtable implementation used in the entry cache -- the table
diff --git a/ldap/servers/slapd/back-ldbm/idl_common.c b/ldap/servers/slapd/back-ldbm/idl_common.c
index fcb0ece4b..fdc9b4e67 100644
--- a/ldap/servers/slapd/back-ldbm/idl_common.c
+++ b/ldap/servers/slapd/back-ldbm/idl_common.c
@@ -172,6 +172,169 @@ idl_min(IDList *a, IDList *b)
return (a->b_nids > b->b_nids ? b : a);
}
+/*
+ * This is a faster version of idl_id_is_in_idlist.
+ * idl_id_is_in_idlist uses an array of ID so lookup is expensive
+ * idl_id_is_in_idlist_ranges uses a list of ranges of ID lookup is faster
+ * returns
+ * 1: 'id' is present in idrange_list
+ * 0: 'id' is not present in idrange_list
+ */
+int
+idl_id_is_in_idlist_ranges(IDList *idl, IdRange_t *idrange_list, ID id)
+{
+ IdRange_t *range = idrange_list;
+ int found = 0;
+
+ if (NULL == idl || NOID == id) {
+ return 0; /* not in the list */
+ }
+ if (ALLIDS(idl)) {
+ return 1; /* in the list */
+ }
+
+ for(;range; range = range->next) {
+ if (id > range->last) {
+ /* check if it belongs to the next range */
+ continue;
+ }
+ if (id >= range->first) {
+ /* It belongs to that range [first..last ] */
+ found = 1;
+ break;
+ } else {
+ /* this range is after id */
+ break;
+ }
+ }
+ return found;
+}
+
+/* This function is used during the online total initialisation
+ * (see next function)
+ * It frees all ranges of ID in the list
+ */
+void idrange_free(IdRange_t **head)
+{
+ IdRange_t *curr, *sav;
+
+ if ((head == NULL) || (*head == NULL)) {
+ return;
+ }
+ curr = *head;
+ sav = NULL;
+ for (; curr;) {
+ sav = curr;
+ curr = curr->next;
+ slapi_ch_free((void *) &sav);
+ }
+ if (sav) {
+ slapi_ch_free((void *) &sav);
+ }
+ *head = NULL;
+}
+
+/* This function is used during the online total initialisation
+ * Because a MODRDN can move entries under a parent that
+ * has a higher ID we need to sort the IDList so that parents
+ * are sent, to the consumer, before the children are sent.
+ * The sorting with a simple IDlist does not scale instead
+ * a list of IDs ranges is much faster.
+ * In that list we only ADD/lookup ID.
+ */
+IdRange_t *idrange_add_id(IdRange_t **head, ID id)
+{
+ if (head == NULL) {
+ slapi_log_err(SLAPI_LOG_ERR, "idrange_add_id",
+ "Can not add ID %d in non defined list\n", id);
+ return NULL;
+ }
+
+ if (*head == NULL) {
+ /* This is the first range */
+ IdRange_t *new_range = (IdRange_t *)slapi_ch_malloc(sizeof(IdRange_t));
+ new_range->first = id;
+ new_range->last = id;
+ new_range->next = NULL;
+ *head = new_range;
+ return *head;
+ }
+
+ IdRange_t *curr = *head, *prev = NULL;
+
+ /* First, find if id already falls within any existing range, or it is adjacent to any */
+ while (curr) {
+ if (id >= curr->first && id <= curr->last) {
+ /* inside a range, nothing to do */
+ return curr;
+ }
+
+ if (id == curr->last + 1) {
+ /* Extend this range upwards */
+ curr->last = id;
+
+ /* Check for possible merge with next range */
+ IdRange_t *next = curr->next;
+ if (next && curr->last + 1 >= next->first) {
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) merge current with next range [%d..%d]\n", id, curr->first, curr->last);
+ curr->last = (next->last > curr->last) ? next->last : curr->last;
+ curr->next = next->next;
+ slapi_ch_free((void*) &next);
+ } else {
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) extend forward current range [%d..%d]\n", id, curr->first, curr->last);
+ }
+ return curr;
+ }
+
+ if (id + 1 == curr->first) {
+ /* Extend this range downwards */
+ curr->first = id;
+
+ /* Check for possible merge with previous range */
+ if (prev && prev->last + 1 >= curr->first) {
+ prev->last = curr->last;
+ prev->next = curr->next;
+ slapi_ch_free((void *) &curr);
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) merge current with previous range [%d..%d]\n", id, prev->first, prev->last);
+ return prev;
+ } else {
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) extend backward current range [%d..%d]\n", id, curr->first, curr->last);
+ return curr;
+ }
+ }
+
+ /* If id is before the current range, break so we can insert before */
+ if (id < curr->first) {
+ break;
+ }
+
+ prev = curr;
+ curr = curr->next;
+ }
+ /* Need to insert a new standalone IdRange */
+ IdRange_t *new_range = (IdRange_t *)slapi_ch_malloc(sizeof(IdRange_t));
+ new_range->first = id;
+ new_range->last = id;
+ new_range->next = curr;
+
+ if (prev) {
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) add new range [%d..%d]\n", id, new_range->first, new_range->last);
+ prev->next = new_range;
+ } else {
+ /* Insert at head */
+ slapi_log_err(SLAPI_LOG_REPL, "idrange_add_id",
+ "(id=%d) head range [%d..%d]\n", id, new_range->first, new_range->last);
+ *head = new_range;
+ }
+ return *head;
+}
+
+
int
idl_id_is_in_idlist(IDList *idl, ID id)
{
diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c b/ldap/servers/slapd/back-ldbm/idl_new.c
index 5fbcaff2e..2d978353f 100644
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
@@ -417,7 +417,6 @@ idl_new_range_fetch(
{
int ret = 0;
int ret2 = 0;
- int idl_rc = 0;
dbi_cursor_t cursor = {0};
IDList *idl = NULL;
dbi_val_t cur_key = {0};
@@ -436,6 +435,7 @@ idl_new_range_fetch(
size_t leftoverlen = 32;
size_t leftovercnt = 0;
char *index_id = get_index_name(be, db, ai);
+ IdRange_t *idrange_list = NULL;
if (NULL == flag_err) {
@@ -578,10 +578,12 @@ idl_new_range_fetch(
* found entry is the one from the suffix
*/
suffix = key;
- idl_rc = idl_append_extend(&idl, id);
- } else if ((key == suffix) || idl_id_is_in_idlist(idl, key)) {
+ idl_append_extend(&idl, id);
+ idrange_add_id(&idrange_list, id);
+ } else if ((key == suffix) || idl_id_is_in_idlist_ranges(idl, idrange_list, key)) {
/* the parent is the suffix or already in idl. */
- idl_rc = idl_append_extend(&idl, id);
+ idl_append_extend(&idl, id);
+ idrange_add_id(&idrange_list, id);
} else {
/* Otherwise, keep the {key,id} in leftover array */
if (!leftover) {
@@ -596,13 +598,7 @@ idl_new_range_fetch(
leftovercnt++;
}
} else {
- idl_rc = idl_append_extend(&idl, id);
- }
- if (idl_rc) {
- slapi_log_err(SLAPI_LOG_ERR, "idl_new_range_fetch",
- "Unable to extend id list (err=%d)\n", idl_rc);
- idl_free(&idl);
- goto error;
+ idl_append_extend(&idl, id);
}
count++;
@@ -695,21 +691,17 @@ error:
while(remaining > 0) {
for (size_t i = 0; i < leftovercnt; i++) {
- if (leftover[i].key > 0 && idl_id_is_in_idlist(idl, leftover[i].key) != 0) {
+ if (leftover[i].key > 0 && idl_id_is_in_idlist_ranges(idl, idrange_list, leftover[i].key) != 0) {
/* if the leftover key has its parent in the idl */
- idl_rc = idl_append_extend(&idl, leftover[i].id);
- if (idl_rc) {
- slapi_log_err(SLAPI_LOG_ERR, "idl_new_range_fetch",
- "Unable to extend id list (err=%d)\n", idl_rc);
- idl_free(&idl);
- return NULL;
- }
+ idl_append_extend(&idl, leftover[i].id);
+ idrange_add_id(&idrange_list, leftover[i].id);
leftover[i].key = 0;
remaining--;
}
}
}
slapi_ch_free((void **)&leftover);
+ idrange_free(&idrange_list);
}
slapi_log_err(SLAPI_LOG_FILTER, "idl_new_range_fetch",
"Found %d candidates; error code is: %d\n",
diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
index 91d61098a..30a7aa11f 100644
--- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
@@ -217,6 +217,9 @@ ID idl_firstid(IDList *idl);
ID idl_nextid(IDList *idl, ID id);
int idl_init_private(backend *be, struct attrinfo *a);
int idl_release_private(struct attrinfo *a);
+IdRange_t *idrange_add_id(IdRange_t **head, ID id);
+void idrange_free(IdRange_t **head);
+int idl_id_is_in_idlist_ranges(IDList *idl, IdRange_t *idrange_list, ID id);
int idl_id_is_in_idlist(IDList *idl, ID id);
idl_iterator idl_iterator_init(const IDList *idl);
--
2.52.0

View file

@ -1,765 +0,0 @@
From 446bc42e7b64a8496c2c3fe486f86bba318bed5e Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Wed, 7 Jan 2026 16:55:27 -0500
Subject: [PATCH] Issue - Revise paged result search locking
Description:
Move to a single lock approach verses having two locks. This will impact
concurrency when multiple async paged result searches are done on the same
connection, but it simplifies the code and avoids race conditions and
deadlocks.
Relates: https://github.com/389ds/389-ds-base/issues/7118
Reviewed by: progier & tbordaz (Thanks!!)
---
ldap/servers/slapd/abandon.c | 2 +-
ldap/servers/slapd/opshared.c | 60 ++++----
ldap/servers/slapd/pagedresults.c | 228 +++++++++++++++++++-----------
ldap/servers/slapd/proto-slap.h | 26 ++--
ldap/servers/slapd/slap.h | 5 +-
5 files changed, 187 insertions(+), 134 deletions(-)
diff --git a/ldap/servers/slapd/abandon.c b/ldap/servers/slapd/abandon.c
index 6024fcd31..1f47c531c 100644
--- a/ldap/servers/slapd/abandon.c
+++ b/ldap/servers/slapd/abandon.c
@@ -179,7 +179,7 @@ do_abandon(Slapi_PBlock *pb)
logpb.tv_sec = -1;
logpb.tv_nsec = -1;
- if (0 == pagedresults_free_one_msgid(pb_conn, id, pageresult_lock_get_addr(pb_conn))) {
+ if (0 == pagedresults_free_one_msgid(pb_conn, id, PR_NOT_LOCKED)) {
if (log_format != LOG_FORMAT_DEFAULT) {
/* JSON logging */
logpb.target_op = "Simple Paged Results";
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index a5cddfd23..bf800f7dc 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -572,8 +572,8 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
be = be_list[index];
}
}
- pr_search_result = pagedresults_get_search_result(pb_conn, operation, 0 /*not locked*/, pr_idx);
- estimate = pagedresults_get_search_result_set_size_estimate(pb_conn, operation, pr_idx);
+ pr_search_result = pagedresults_get_search_result(pb_conn, operation, PR_NOT_LOCKED, pr_idx);
+ estimate = pagedresults_get_search_result_set_size_estimate(pb_conn, operation, PR_NOT_LOCKED, pr_idx);
/* Set operation note flags as required. */
if (pagedresults_get_unindexed(pb_conn, operation, pr_idx)) {
slapi_pblock_set_flag_operation_notes(pb, SLAPI_OP_NOTE_UNINDEXED);
@@ -619,14 +619,7 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
int32_t tlimit;
slapi_pblock_get(pb, SLAPI_SEARCH_TIMELIMIT, &tlimit);
pagedresults_set_timelimit(pb_conn, operation, (time_t)tlimit, pr_idx);
- /* When using this mutex in conjunction with the main paged
- * result lock, you must do so in this order:
- *
- * --> pagedresults_lock()
- * --> pagedresults_mutex
- * <-- pagedresults_mutex
- * <-- pagedresults_unlock()
- */
+ /* IMPORTANT: Never acquire pagedresults_mutex when holding c_mutex. */
pagedresults_mutex = pageresult_lock_get_addr(pb_conn);
}
@@ -743,17 +736,15 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
if (op_is_pagedresults(operation) && pr_search_result) {
void *sr = NULL;
/* PAGED RESULTS and already have the search results from the prev op */
- pagedresults_lock(pb_conn, pr_idx);
/*
* In async paged result case, the search result might be released
* by other theads. We need to double check it in the locked region.
*/
pthread_mutex_lock(pagedresults_mutex);
- pr_search_result = pagedresults_get_search_result(pb_conn, operation, 1 /*locked*/, pr_idx);
+ pr_search_result = pagedresults_get_search_result(pb_conn, operation, PR_LOCKED, pr_idx);
if (pr_search_result) {
- if (pagedresults_is_abandoned_or_notavailable(pb_conn, 1 /*locked*/, pr_idx)) {
+ if (pagedresults_is_abandoned_or_notavailable(pb_conn, PR_LOCKED, pr_idx)) {
pthread_mutex_unlock(pagedresults_mutex);
- pagedresults_unlock(pb_conn, pr_idx);
/* Previous operation was abandoned and the simplepaged object is not in use. */
send_ldap_result(pb, 0, NULL, "Simple Paged Results Search abandoned", 0, NULL);
rc = LDAP_SUCCESS;
@@ -764,14 +755,13 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
/* search result could be reset in the backend/dse */
slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_SET, &sr);
- pagedresults_set_search_result(pb_conn, operation, sr, 1 /*locked*/, pr_idx);
+ pagedresults_set_search_result(pb_conn, operation, sr, PR_LOCKED, pr_idx);
}
} else {
pr_stat = PAGEDRESULTS_SEARCH_END;
rc = LDAP_SUCCESS;
}
pthread_mutex_unlock(pagedresults_mutex);
- pagedresults_unlock(pb_conn, pr_idx);
if ((PAGEDRESULTS_SEARCH_END == pr_stat) || (0 == pnentries)) {
/* no more entries to send in the backend */
@@ -789,22 +779,22 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
}
pagedresults_set_response_control(pb, 0, estimate,
curr_search_count, pr_idx);
- if (pagedresults_get_with_sort(pb_conn, operation, pr_idx)) {
+ if (pagedresults_get_with_sort(pb_conn, operation, PR_NOT_LOCKED, pr_idx)) {
sort_make_sort_response_control(pb, CONN_GET_SORT_RESULT_CODE, NULL);
}
pagedresults_set_search_result_set_size_estimate(pb_conn,
operation,
- estimate, pr_idx);
+ estimate, PR_NOT_LOCKED, pr_idx);
if (PAGEDRESULTS_SEARCH_END == pr_stat) {
- pagedresults_lock(pb_conn, pr_idx);
+ pthread_mutex_lock(pagedresults_mutex);
slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_SET, NULL);
- if (!pagedresults_is_abandoned_or_notavailable(pb_conn, 0 /*not locked*/, pr_idx)) {
- pagedresults_free_one(pb_conn, operation, pr_idx);
+ if (!pagedresults_is_abandoned_or_notavailable(pb_conn, PR_LOCKED, pr_idx)) {
+ pagedresults_free_one(pb_conn, operation, PR_LOCKED, pr_idx);
}
- pagedresults_unlock(pb_conn, pr_idx);
+ pthread_mutex_unlock(pagedresults_mutex);
if (next_be) {
/* no more entries, but at least another backend */
- if (pagedresults_set_current_be(pb_conn, next_be, pr_idx, 0) < 0) {
+ if (pagedresults_set_current_be(pb_conn, next_be, pr_idx, PR_NOT_LOCKED) < 0) {
goto free_and_return;
}
}
@@ -915,7 +905,7 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
}
}
pagedresults_set_search_result(pb_conn, operation, NULL, 1, pr_idx);
- rc = pagedresults_set_current_be(pb_conn, NULL, pr_idx, 1);
+ rc = pagedresults_set_current_be(pb_conn, NULL, pr_idx, PR_LOCKED);
pthread_mutex_unlock(pagedresults_mutex);
#pragma GCC diagnostic pop
}
@@ -954,7 +944,7 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
pthread_mutex_lock(pagedresults_mutex);
pagedresults_set_search_result(pb_conn, operation, NULL, 1, pr_idx);
be->be_search_results_release(&sr);
- rc = pagedresults_set_current_be(pb_conn, next_be, pr_idx, 1);
+ rc = pagedresults_set_current_be(pb_conn, next_be, pr_idx, PR_LOCKED);
pthread_mutex_unlock(pagedresults_mutex);
pr_stat = PAGEDRESULTS_SEARCH_END; /* make sure stat is SEARCH_END */
if (NULL == next_be) {
@@ -967,23 +957,23 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
} else {
curr_search_count = pnentries;
slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_SET_SIZE_ESTIMATE, &estimate);
- pagedresults_lock(pb_conn, pr_idx);
- if ((pagedresults_set_current_be(pb_conn, be, pr_idx, 0) < 0) ||
- (pagedresults_set_search_result(pb_conn, operation, sr, 0, pr_idx) < 0) ||
- (pagedresults_set_search_result_count(pb_conn, operation, curr_search_count, pr_idx) < 0) ||
- (pagedresults_set_search_result_set_size_estimate(pb_conn, operation, estimate, pr_idx) < 0) ||
- (pagedresults_set_with_sort(pb_conn, operation, with_sort, pr_idx) < 0)) {
- pagedresults_unlock(pb_conn, pr_idx);
+ pthread_mutex_lock(pagedresults_mutex);
+ if ((pagedresults_set_current_be(pb_conn, be, pr_idx, PR_LOCKED) < 0) ||
+ (pagedresults_set_search_result(pb_conn, operation, sr, PR_LOCKED, pr_idx) < 0) ||
+ (pagedresults_set_search_result_count(pb_conn, operation, curr_search_count, PR_LOCKED, pr_idx) < 0) ||
+ (pagedresults_set_search_result_set_size_estimate(pb_conn, operation, estimate, PR_LOCKED, pr_idx) < 0) ||
+ (pagedresults_set_with_sort(pb_conn, operation, with_sort, PR_LOCKED, pr_idx) < 0)) {
+ pthread_mutex_unlock(pagedresults_mutex);
cache_return_target_entry(pb, be, operation);
goto free_and_return;
}
- pagedresults_unlock(pb_conn, pr_idx);
+ pthread_mutex_unlock(pagedresults_mutex);
}
slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_SET, NULL);
next_be = NULL; /* to break the loop */
if (operation->o_status & SLAPI_OP_STATUS_ABANDONED) {
/* It turned out this search was abandoned. */
- pagedresults_free_one_msgid(pb_conn, operation->o_msgid, pagedresults_mutex);
+ pagedresults_free_one_msgid(pb_conn, operation->o_msgid, PR_NOT_LOCKED);
/* paged-results-request was abandoned; making an empty cookie. */
pagedresults_set_response_control(pb, 0, estimate, -1, pr_idx);
send_ldap_result(pb, 0, NULL, "Simple Paged Results Search abandoned", 0, NULL);
@@ -993,7 +983,7 @@ op_shared_search(Slapi_PBlock *pb, int send_result)
}
pagedresults_set_response_control(pb, 0, estimate, curr_search_count, pr_idx);
if (curr_search_count == -1) {
- pagedresults_free_one(pb_conn, operation, pr_idx);
+ pagedresults_free_one(pb_conn, operation, PR_NOT_LOCKED, pr_idx);
}
}
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index 941ab97e3..0d6c4a1aa 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -34,9 +34,9 @@ pageresult_lock_cleanup()
slapi_ch_free((void**)&lock_hash);
}
-/* Beware to the lock order with c_mutex:
- * c_mutex is sometime locked while holding pageresult_lock
- * ==> Do not lock pageresult_lock when holing c_mutex
+/* Lock ordering constraint with c_mutex:
+ * c_mutex is sometimes locked while holding pageresult_lock.
+ * Therefore: DO NOT acquire pageresult_lock when holding c_mutex.
*/
pthread_mutex_t *
pageresult_lock_get_addr(Connection *conn)
@@ -44,7 +44,11 @@ pageresult_lock_get_addr(Connection *conn)
return &lock_hash[(((size_t)conn)/sizeof (Connection))%LOCK_HASH_SIZE];
}
-/* helper function to clean up one prp slot */
+/* helper function to clean up one prp slot
+ *
+ * NOTE: This function must be called while holding the pageresult_lock
+ * (via pageresult_lock_get_addr(conn)) to ensure thread-safe cleanup.
+ */
static void
_pr_cleanup_one_slot(PagedResults *prp)
{
@@ -56,7 +60,7 @@ _pr_cleanup_one_slot(PagedResults *prp)
prp->pr_current_be->be_search_results_release(&(prp->pr_search_result_set));
}
- /* clean up the slot except the mutex */
+ /* clean up the slot */
prp->pr_current_be = NULL;
prp->pr_search_result_set = NULL;
prp->pr_search_result_count = 0;
@@ -136,6 +140,8 @@ pagedresults_parse_control_value(Slapi_PBlock *pb,
return LDAP_UNWILLING_TO_PERFORM;
}
+ /* Acquire hash-based lock for paged results list access
+ * IMPORTANT: Never acquire this lock when holding c_mutex */
pthread_mutex_lock(pageresult_lock_get_addr(conn));
/* the ber encoding is no longer needed */
ber_free(ber, 1);
@@ -184,10 +190,6 @@ pagedresults_parse_control_value(Slapi_PBlock *pb,
goto bail;
}
- if ((*index > -1) && (*index < conn->c_pagedresults.prl_maxlen) &&
- !conn->c_pagedresults.prl_list[*index].pr_mutex) {
- conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
- }
conn->c_pagedresults.prl_count++;
} else {
/* Repeated paged results request.
@@ -327,8 +329,14 @@ bailout:
"<= idx=%d\n", index);
}
+/*
+ * Free one paged result entry by index.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_free_one(Connection *conn, Operation *op, int index)
+pagedresults_free_one(Connection *conn, Operation *op, bool locked, int index)
{
int rc = -1;
@@ -338,7 +346,9 @@ pagedresults_free_one(Connection *conn, Operation *op, int index)
slapi_log_err(SLAPI_LOG_TRACE, "pagedresults_free_one",
"=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (conn->c_pagedresults.prl_count <= 0) {
slapi_log_err(SLAPI_LOG_TRACE, "pagedresults_free_one",
"conn=%" PRIu64 " paged requests list count is %d\n",
@@ -349,7 +359,9 @@ pagedresults_free_one(Connection *conn, Operation *op, int index)
conn->c_pagedresults.prl_count--;
rc = 0;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
}
slapi_log_err(SLAPI_LOG_TRACE, "pagedresults_free_one", "<= %d\n", rc);
@@ -357,21 +369,28 @@ pagedresults_free_one(Connection *conn, Operation *op, int index)
}
/*
- * Used for abandoning - pageresult_lock_get_addr(conn) is already locked in do_abandone.
+ * Free one paged result entry by message ID.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
*/
int
-pagedresults_free_one_msgid(Connection *conn, ber_int_t msgid, pthread_mutex_t *mutex)
+pagedresults_free_one_msgid(Connection *conn, ber_int_t msgid, bool locked)
{
int rc = -1;
int i;
+ pthread_mutex_t *lock = NULL;
if (conn && (msgid > -1)) {
if (conn->c_pagedresults.prl_maxlen <= 0) {
; /* Not a paged result. */
} else {
slapi_log_err(SLAPI_LOG_TRACE,
- "pagedresults_free_one_msgid_nolock", "=> msgid=%d\n", msgid);
- pthread_mutex_lock(mutex);
+ "pagedresults_free_one_msgid", "=> msgid=%d\n", msgid);
+ lock = pageresult_lock_get_addr(conn);
+ if (!locked) {
+ pthread_mutex_lock(lock);
+ }
for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++) {
if (conn->c_pagedresults.prl_list[i].pr_msgid == msgid) {
PagedResults *prp = conn->c_pagedresults.prl_list + i;
@@ -390,9 +409,11 @@ pagedresults_free_one_msgid(Connection *conn, ber_int_t msgid, pthread_mutex_t *
break;
}
}
- pthread_mutex_unlock(mutex);
+ if (!locked) {
+ pthread_mutex_unlock(lock);
+ }
slapi_log_err(SLAPI_LOG_TRACE,
- "pagedresults_free_one_msgid_nolock", "<= %d\n", rc);
+ "pagedresults_free_one_msgid", "<= %d\n", rc);
}
}
@@ -418,29 +439,43 @@ pagedresults_get_current_be(Connection *conn, int index)
return be;
}
+/*
+ * Set current backend for a paged result entry.
+ *
+ * Locking: If locked=false, acquires pageresult_lock. If locked=true, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int index, int nolock)
+pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int index, bool locked)
{
int rc = -1;
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_set_current_be", "=> idx=%d\n", index);
if (conn && (index > -1)) {
- if (!nolock)
+ if (!locked) {
pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
conn->c_pagedresults.prl_list[index].pr_current_be = be;
}
rc = 0;
- if (!nolock)
+ if (!locked) {
pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
}
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_set_current_be", "<= %d\n", rc);
return rc;
}
+/*
+ * Get search result set for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
void *
-pagedresults_get_search_result(Connection *conn, Operation *op, int locked, int index)
+pagedresults_get_search_result(Connection *conn, Operation *op, bool locked, int index)
{
void *sr = NULL;
if (!op_is_pagedresults(op)) {
@@ -465,8 +500,14 @@ pagedresults_get_search_result(Connection *conn, Operation *op, int locked, int
return sr;
}
+/*
+ * Set search result set for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_set_search_result(Connection *conn, Operation *op, void *sr, int locked, int index)
+pagedresults_set_search_result(Connection *conn, Operation *op, void *sr, bool locked, int index)
{
int rc = -1;
if (!op_is_pagedresults(op)) {
@@ -494,8 +535,14 @@ pagedresults_set_search_result(Connection *conn, Operation *op, void *sr, int lo
return rc;
}
+/*
+ * Get search result count for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_get_search_result_count(Connection *conn, Operation *op, int index)
+pagedresults_get_search_result_count(Connection *conn, Operation *op, bool locked, int index)
{
int count = 0;
if (!op_is_pagedresults(op)) {
@@ -504,19 +551,29 @@ pagedresults_get_search_result_count(Connection *conn, Operation *op, int index)
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_get_search_result_count", "=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
count = conn->c_pagedresults.prl_list[index].pr_search_result_count;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
}
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_get_search_result_count", "<= %d\n", count);
return count;
}
+/*
+ * Set search result count for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_set_search_result_count(Connection *conn, Operation *op, int count, int index)
+pagedresults_set_search_result_count(Connection *conn, Operation *op, int count, bool locked, int index)
{
int rc = -1;
if (!op_is_pagedresults(op)) {
@@ -525,11 +582,15 @@ pagedresults_set_search_result_count(Connection *conn, Operation *op, int count,
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_set_search_result_count", "=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
conn->c_pagedresults.prl_list[index].pr_search_result_count = count;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
rc = 0;
}
slapi_log_err(SLAPI_LOG_TRACE,
@@ -537,9 +598,16 @@ pagedresults_set_search_result_count(Connection *conn, Operation *op, int count,
return rc;
}
+/*
+ * Get search result set size estimate for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
pagedresults_get_search_result_set_size_estimate(Connection *conn,
Operation *op,
+ bool locked,
int index)
{
int count = 0;
@@ -550,11 +618,15 @@ pagedresults_get_search_result_set_size_estimate(Connection *conn,
"pagedresults_get_search_result_set_size_estimate",
"=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
count = conn->c_pagedresults.prl_list[index].pr_search_result_set_size_estimate;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
}
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_get_search_result_set_size_estimate", "<= %d\n",
@@ -562,10 +634,17 @@ pagedresults_get_search_result_set_size_estimate(Connection *conn,
return count;
}
+/*
+ * Set search result set size estimate for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
pagedresults_set_search_result_set_size_estimate(Connection *conn,
Operation *op,
int count,
+ bool locked,
int index)
{
int rc = -1;
@@ -576,11 +655,15 @@ pagedresults_set_search_result_set_size_estimate(Connection *conn,
"pagedresults_set_search_result_set_size_estimate",
"=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
conn->c_pagedresults.prl_list[index].pr_search_result_set_size_estimate = count;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
rc = 0;
}
slapi_log_err(SLAPI_LOG_TRACE,
@@ -589,8 +672,14 @@ pagedresults_set_search_result_set_size_estimate(Connection *conn,
return rc;
}
+/*
+ * Get with_sort flag for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_get_with_sort(Connection *conn, Operation *op, int index)
+pagedresults_get_with_sort(Connection *conn, Operation *op, bool locked, int index)
{
int flags = 0;
if (!op_is_pagedresults(op)) {
@@ -599,19 +688,29 @@ pagedresults_get_with_sort(Connection *conn, Operation *op, int index)
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_get_with_sort", "=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
flags = conn->c_pagedresults.prl_list[index].pr_flags & CONN_FLAG_PAGEDRESULTS_WITH_SORT;
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
}
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_get_with_sort", "<= %d\n", flags);
return flags;
}
+/*
+ * Set with_sort flag for a paged result entry.
+ *
+ * Locking: If locked=0, acquires pageresult_lock. If locked=1, assumes
+ * caller already holds pageresult_lock. Never call when holding c_mutex.
+ */
int
-pagedresults_set_with_sort(Connection *conn, Operation *op, int flags, int index)
+pagedresults_set_with_sort(Connection *conn, Operation *op, int flags, bool locked, int index)
{
int rc = -1;
if (!op_is_pagedresults(op)) {
@@ -620,14 +719,18 @@ pagedresults_set_with_sort(Connection *conn, Operation *op, int flags, int index
slapi_log_err(SLAPI_LOG_TRACE,
"pagedresults_set_with_sort", "=> idx=%d\n", index);
if (conn && (index > -1)) {
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_lock(pageresult_lock_get_addr(conn));
+ }
if (index < conn->c_pagedresults.prl_maxlen) {
if (flags & OP_FLAG_SERVER_SIDE_SORTING) {
conn->c_pagedresults.prl_list[index].pr_flags |=
CONN_FLAG_PAGEDRESULTS_WITH_SORT;
}
}
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ if (!locked) {
+ pthread_mutex_unlock(pageresult_lock_get_addr(conn));
+ }
rc = 0;
}
slapi_log_err(SLAPI_LOG_TRACE, "pagedresults_set_with_sort", "<= %d\n", rc);
@@ -802,10 +905,6 @@ pagedresults_cleanup(Connection *conn, int needlock)
rc = 1;
}
prp->pr_current_be = NULL;
- if (prp->pr_mutex) {
- PR_DestroyLock(prp->pr_mutex);
- prp->pr_mutex = NULL;
- }
memset(prp, '\0', sizeof(PagedResults));
}
conn->c_pagedresults.prl_count = 0;
@@ -840,10 +939,6 @@ pagedresults_cleanup_all(Connection *conn, int needlock)
i < conn->c_pagedresults.prl_maxlen;
i++) {
prp = conn->c_pagedresults.prl_list + i;
- if (prp->pr_mutex) {
- PR_DestroyLock(prp->pr_mutex);
- prp->pr_mutex = NULL;
- }
if (prp->pr_current_be && prp->pr_search_result_set &&
prp->pr_current_be->be_search_results_release) {
prp->pr_current_be->be_search_results_release(&(prp->pr_search_result_set));
@@ -1010,43 +1105,8 @@ op_set_pagedresults(Operation *op)
op->o_flags |= OP_FLAG_PAGED_RESULTS;
}
-/*
- * pagedresults_lock/unlock -- introduced to protect search results for the
- * asynchronous searches. Do not call these functions while the PR conn lock
- * is held (e.g. pageresult_lock_get_addr(conn))
- */
-void
-pagedresults_lock(Connection *conn, int index)
-{
- PagedResults *prp;
- if (!conn || (index < 0) || (index >= conn->c_pagedresults.prl_maxlen)) {
- return;
- }
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
- prp = conn->c_pagedresults.prl_list + index;
- if (prp->pr_mutex) {
- PR_Lock(prp->pr_mutex);
- }
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
-}
-
-void
-pagedresults_unlock(Connection *conn, int index)
-{
- PagedResults *prp;
- if (!conn || (index < 0) || (index >= conn->c_pagedresults.prl_maxlen)) {
- return;
- }
- pthread_mutex_lock(pageresult_lock_get_addr(conn));
- prp = conn->c_pagedresults.prl_list + index;
- if (prp->pr_mutex) {
- PR_Unlock(prp->pr_mutex);
- }
- pthread_mutex_unlock(pageresult_lock_get_addr(conn));
-}
-
int
-pagedresults_is_abandoned_or_notavailable(Connection *conn, int locked, int index)
+pagedresults_is_abandoned_or_notavailable(Connection *conn, bool locked, int index)
{
PagedResults *prp;
int32_t result;
@@ -1066,7 +1126,7 @@ pagedresults_is_abandoned_or_notavailable(Connection *conn, int locked, int inde
}
int
-pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, int locked)
+pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, bool locked)
{
int rc = -1;
Connection *conn = NULL;
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 765c12bf5..455d6d718 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -1614,20 +1614,22 @@ pthread_mutex_t *pageresult_lock_get_addr(Connection *conn);
int pagedresults_parse_control_value(Slapi_PBlock *pb, struct berval *psbvp, ber_int_t *pagesize, int *index, Slapi_Backend *be);
void pagedresults_set_response_control(Slapi_PBlock *pb, int iscritical, ber_int_t estimate, int curr_search_count, int index);
Slapi_Backend *pagedresults_get_current_be(Connection *conn, int index);
-int pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int index, int nolock);
-void *pagedresults_get_search_result(Connection *conn, Operation *op, int locked, int index);
-int pagedresults_set_search_result(Connection *conn, Operation *op, void *sr, int locked, int index);
-int pagedresults_get_search_result_count(Connection *conn, Operation *op, int index);
-int pagedresults_set_search_result_count(Connection *conn, Operation *op, int cnt, int index);
+int pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int index, bool locked);
+void *pagedresults_get_search_result(Connection *conn, Operation *op, bool locked, int index);
+int pagedresults_set_search_result(Connection *conn, Operation *op, void *sr, bool locked, int index);
+int pagedresults_get_search_result_count(Connection *conn, Operation *op, bool locked, int index);
+int pagedresults_set_search_result_count(Connection *conn, Operation *op, int cnt, bool locked, int index);
int pagedresults_get_search_result_set_size_estimate(Connection *conn,
Operation *op,
+ bool locked,
int index);
int pagedresults_set_search_result_set_size_estimate(Connection *conn,
Operation *op,
int cnt,
+ bool locked,
int index);
-int pagedresults_get_with_sort(Connection *conn, Operation *op, int index);
-int pagedresults_set_with_sort(Connection *conn, Operation *op, int flags, int index);
+int pagedresults_get_with_sort(Connection *conn, Operation *op, bool locked, int index);
+int pagedresults_set_with_sort(Connection *conn, Operation *op, int flags, bool locked, int index);
int pagedresults_get_unindexed(Connection *conn, Operation *op, int index);
int pagedresults_set_unindexed(Connection *conn, Operation *op, int index);
int pagedresults_get_sort_result_code(Connection *conn, Operation *op, int index);
@@ -1639,15 +1641,13 @@ int pagedresults_cleanup(Connection *conn, int needlock);
int pagedresults_is_timedout_nolock(Connection *conn);
int pagedresults_reset_timedout_nolock(Connection *conn);
int pagedresults_in_use_nolock(Connection *conn);
-int pagedresults_free_one(Connection *conn, Operation *op, int index);
-int pagedresults_free_one_msgid(Connection *conn, ber_int_t msgid, pthread_mutex_t *mutex);
+int pagedresults_free_one(Connection *conn, Operation *op, bool locked, int index);
+int pagedresults_free_one_msgid(Connection *conn, ber_int_t msgid, bool locked);
int op_is_pagedresults(Operation *op);
int pagedresults_cleanup_all(Connection *conn, int needlock);
void op_set_pagedresults(Operation *op);
-void pagedresults_lock(Connection *conn, int index);
-void pagedresults_unlock(Connection *conn, int index);
-int pagedresults_is_abandoned_or_notavailable(Connection *conn, int locked, int index);
-int pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, int locked);
+int pagedresults_is_abandoned_or_notavailable(Connection *conn, bool locked, int index);
+int pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, bool locked);
/*
* sort.c
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index 11c5602e3..d494931c2 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -89,6 +89,10 @@ static char ptokPBE[34] = "Internal (Software) Token ";
#include <stdbool.h>
#include <time.h> /* For timespec definitions */
+/* Macros for paged results lock parameter */
+#define PR_LOCKED true
+#define PR_NOT_LOCKED false
+
/* Provides our int types and platform specific requirements. */
#include <slapi_pal.h>
@@ -1669,7 +1673,6 @@ typedef struct _paged_results
struct timespec pr_timelimit_hr; /* expiry time of this request rel to clock monotonic */
int pr_flags;
ber_int_t pr_msgid; /* msgid of the request; to abandon */
- PRLock *pr_mutex; /* protect each conn structure */
} PagedResults;
/* array of simple paged structure stashed in connection */
--
2.52.0

View file

@ -1,183 +0,0 @@
From 4936f953fa3b0726c2b178f135cd78dcac7463ba Mon Sep 17 00:00:00 2001
From: Simon Pichugin <spichugi@redhat.com>
Date: Thu, 8 Jan 2026 10:02:39 -0800
Subject: [PATCH] Issue 7108 - Fix shutdown crash in entry cache destruction
(#7163)
Description: The entry cache could experience LRU list corruption when
using pinned entries, leading to crashes during cache flush operations.
In entrycache_add_int(), when returning an existing cached entry, the
code checked the wrong entry's state before calling lru_delete(). It
checked the new entry 'e' but operated on the existing entry 'my_alt',
causing lru_delete() to be called on entries not in the LRU list. This
is fixed by checking my_alt's refcnt and pinned state instead.
In flush_hash(), pinned_remove() and lru_delete() were both called on
pinned entries. Since pinned entries are in the pinned list, calling
lru_delete() afterwards corrupted the list. This is fixed by calling
either pinned_remove() or lru_delete() based on the entry's state.
A NULL check is added in entrycache_flush() and dncache_flush() to
gracefully handle corrupted LRU lists and prevent crashes when
traversing backwards through the list encounters an unexpected NULL.
Entry pointers are now always cleared after lru_delete() removal to
prevent stale pointer issues in non-debug builds.
Fixes: https://github.com/389ds/389-ds-base/issues/7108
Reviewed by: @progier389, @vashirov (Thanks!!)
---
ldap/servers/slapd/back-ldbm/cache.c | 48 +++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 5 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c
index 2e4126134..a87f30687 100644
--- a/ldap/servers/slapd/back-ldbm/cache.c
+++ b/ldap/servers/slapd/back-ldbm/cache.c
@@ -458,11 +458,13 @@ static void
lru_delete(struct cache *cache, void *ptr)
{
struct backcommon *e;
+
if (NULL == ptr) {
LOG("=> lru_delete\n<= lru_delete (null entry)\n");
return;
}
e = (struct backcommon *)ptr;
+
#ifdef LDAP_CACHE_DEBUG_LRU
pinned_verify(cache, __LINE__);
lru_verify(cache, e, 1);
@@ -475,8 +477,9 @@ lru_delete(struct cache *cache, void *ptr)
e->ep_lrunext->ep_lruprev = e->ep_lruprev;
else
cache->c_lrutail = e->ep_lruprev;
-#ifdef LDAP_CACHE_DEBUG_LRU
+ /* Always clear pointers after removal to prevent stale pointer issues */
e->ep_lrunext = e->ep_lruprev = NULL;
+#ifdef LDAP_CACHE_DEBUG_LRU
lru_verify(cache, e, 0);
#endif
}
@@ -633,9 +636,14 @@ flush_hash(struct cache *cache, struct timespec *start_time, int32_t type)
if (entry->ep_refcnt == 0) {
entry->ep_refcnt++;
if (entry->ep_state & ENTRY_STATE_PINNED) {
+ /* Entry is in pinned list, not LRU - remove from pinned only.
+ * pinned_remove clears lru pointers and won't add to LRU since refcnt > 0.
+ */
pinned_remove(cache, laste);
+ } else {
+ /* Entry is in LRU list - remove from LRU */
+ lru_delete(cache, laste);
}
- lru_delete(cache, laste);
if (type == ENTRY_CACHE) {
entrycache_remove_int(cache, laste);
entrycache_return(cache, (struct backentry **)&laste, PR_TRUE);
@@ -679,9 +687,14 @@ flush_hash(struct cache *cache, struct timespec *start_time, int32_t type)
if (entry->ep_refcnt == 0) {
entry->ep_refcnt++;
if (entry->ep_state & ENTRY_STATE_PINNED) {
+ /* Entry is in pinned list, not LRU - remove from pinned only.
+ * pinned_remove clears lru pointers and won't add to LRU since refcnt > 0.
+ */
pinned_remove(cache, laste);
+ } else {
+ /* Entry is in LRU list - remove from LRU */
+ lru_delete(cache, laste);
}
- lru_delete(cache, laste);
entrycache_remove_int(cache, laste);
entrycache_return(cache, (struct backentry **)&laste, PR_TRUE);
} else {
@@ -772,6 +785,11 @@ entrycache_flush(struct cache *cache)
} else {
e = BACK_LRU_PREV(e, struct backentry *);
}
+ if (e == NULL) {
+ slapi_log_err(SLAPI_LOG_WARNING, "entrycache_flush",
+ "Unexpected NULL entry while flushing cache - LRU list may be corrupted\n");
+ break;
+ }
ASSERT(e->ep_refcnt == 0);
e->ep_refcnt++;
if (entrycache_remove_int(cache, e) < 0) {
@@ -1160,6 +1178,7 @@ pinned_remove(struct cache *cache, void *ptr)
{
struct backentry *e = (struct backentry *)ptr;
ASSERT(e->ep_state & ENTRY_STATE_PINNED);
+
cache->c_pinned_ctx->npinned--;
cache->c_pinned_ctx->size -= e->ep_size;
e->ep_state &= ~ENTRY_STATE_PINNED;
@@ -1172,13 +1191,23 @@ pinned_remove(struct cache *cache, void *ptr)
cache->c_pinned_ctx->head = cache->c_pinned_ctx->tail = NULL;
} else {
cache->c_pinned_ctx->head = BACK_LRU_NEXT(e, struct backentry *);
+ /* Update new head's prev pointer to NULL */
+ if (cache->c_pinned_ctx->head) {
+ cache->c_pinned_ctx->head->ep_lruprev = NULL;
+ }
}
} else if (cache->c_pinned_ctx->tail == e) {
cache->c_pinned_ctx->tail = BACK_LRU_PREV(e, struct backentry *);
+ /* Update new tail's next pointer to NULL */
+ if (cache->c_pinned_ctx->tail) {
+ cache->c_pinned_ctx->tail->ep_lrunext = NULL;
+ }
} else {
+ /* Middle of list: update both neighbors to point to each other */
BACK_LRU_PREV(e, struct backentry *)->ep_lrunext = BACK_LRU_NEXT(e, struct backcommon *);
BACK_LRU_NEXT(e, struct backentry *)->ep_lruprev = BACK_LRU_PREV(e, struct backcommon *);
}
+ /* Clear the removed entry's pointers */
e->ep_lrunext = e->ep_lruprev = NULL;
if (e->ep_refcnt == 0) {
lru_add(cache, ptr);
@@ -1245,6 +1274,7 @@ pinned_add(struct cache *cache, void *ptr)
return false;
}
/* Now it is time to insert the entry in the pinned list */
+
cache->c_pinned_ctx->npinned++;
cache->c_pinned_ctx->size += e->ep_size;
e->ep_state |= ENTRY_STATE_PINNED;
@@ -1754,7 +1784,7 @@ entrycache_add_int(struct cache *cache, struct backentry *e, int state, struct b
* 3) ep_state: 0 && state: 0
* ==> increase the refcnt
*/
- if (e->ep_refcnt == 0)
+ if (e->ep_refcnt == 0 && (e->ep_state & ENTRY_STATE_PINNED) == 0)
lru_delete(cache, (void *)e);
e->ep_refcnt++;
e->ep_state &= ~ENTRY_STATE_UNAVAILABLE;
@@ -1781,7 +1811,7 @@ entrycache_add_int(struct cache *cache, struct backentry *e, int state, struct b
} else {
if (alt) {
*alt = my_alt;
- if (e->ep_refcnt == 0 && (e->ep_state & ENTRY_STATE_PINNED) == 0)
+ if (my_alt->ep_refcnt == 0 && (my_alt->ep_state & ENTRY_STATE_PINNED) == 0)
lru_delete(cache, (void *)*alt);
(*alt)->ep_refcnt++;
LOG("the entry %s already exists. returning existing entry %s (state: 0x%x)\n",
@@ -2379,6 +2409,14 @@ dncache_flush(struct cache *cache)
} else {
dn = BACK_LRU_PREV(dn, struct backdn *);
}
+ if (dn == NULL) {
+ /* Safety check: we should normally exit via the CACHE_LRU_HEAD check.
+ * If we get here, c_lruhead may be NULL or the LRU list is corrupted.
+ */
+ slapi_log_err(SLAPI_LOG_WARNING, "dncache_flush",
+ "Unexpected NULL entry while flushing cache - LRU list may be corrupted\n");
+ break;
+ }
ASSERT(dn->ep_refcnt == 0);
dn->ep_refcnt++;
if (dncache_remove_int(cache, dn) < 0) {
--
2.52.0

View file

@ -1,215 +0,0 @@
From 742c12e0247ab64e87da000a4de2f3e5c99044ab Mon Sep 17 00:00:00 2001
From: Viktor Ashirov <vashirov@redhat.com>
Date: Fri, 9 Jan 2026 11:39:50 +0100
Subject: [PATCH] Issue 7172 - Index ordering mismatch after upgrade (#7173)
Bug Description:
Commit daf731f55071d45eaf403a52b63d35f4e699ff28 introduced a regression.
After upgrading to a version that adds `integerOrderingMatch` matching
rule to `parentid` and `ancestorid` indexes, searches may return empty
or incorrect results.
This happens because the existing index data was created with
lexicographic ordering, but the new compare function expects integer
ordering. Index lookups fail because the compare function doesn't match
the data ordering.
The root cause is that `ldbm_instance_create_default_indexes()` calls
`attr_index_config()` unconditionally for `parentid` and `ancestorid`
indexes, which triggers `ainfo_dup()` to overwrite `ai_key_cmp_fn` on
existing indexes. This breaks indexes that were created without the
`integerOrderingMatch` matching rule.
Fix Description:
* Call `attr_index_config()` for `parentid` and `ancestorid` indexes
only if index config doesn't exist.
* Add `upgrade_check_id_index_matching_rule()` that logs an error on
server startup if `parentid` or `ancestorid` indexes are missing the
integerOrderingMatch matching rule, advising administrators to reindex.
Fixes: https://github.com/389ds/389-ds-base/issues/7172
Reviewed by: @tbordaz, @progier389, @droideck (Thanks!)
---
ldap/servers/slapd/back-ldbm/instance.c | 25 ++++--
ldap/servers/slapd/upgrade.c | 107 +++++++++++++++++++++++-
2 files changed, 123 insertions(+), 9 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/instance.c b/ldap/servers/slapd/back-ldbm/instance.c
index cb002c379..71bf0f6fa 100644
--- a/ldap/servers/slapd/back-ldbm/instance.c
+++ b/ldap/servers/slapd/back-ldbm/instance.c
@@ -190,6 +190,7 @@ ldbm_instance_create_default_indexes(backend *be)
char *ancestorid_indexes_limit = NULL;
char *parentid_indexes_limit = NULL;
struct attrinfo *ai = NULL;
+ struct attrinfo *index_already_configured = NULL;
struct index_idlistsizeinfo *iter;
int cookie;
int limit;
@@ -248,10 +249,14 @@ ldbm_instance_create_default_indexes(backend *be)
ldbm_instance_config_add_index_entry(inst, e, flags);
slapi_entry_free(e);
- e = ldbm_instance_init_config_entry(LDBM_PARENTID_STR, "eq", 0, 0, 0, "integerOrderingMatch", parentid_indexes_limit);
- ldbm_instance_config_add_index_entry(inst, e, flags);
- attr_index_config(be, "ldbm index init", 0, e, 1, 0, NULL);
- slapi_entry_free(e);
+ ainfo_get(be, (char *)LDBM_PARENTID_STR, &ai);
+ index_already_configured = ai;
+ if (!index_already_configured) {
+ e = ldbm_instance_init_config_entry(LDBM_PARENTID_STR, "eq", 0, 0, 0, "integerOrderingMatch", parentid_indexes_limit);
+ ldbm_instance_config_add_index_entry(inst, e, flags);
+ attr_index_config(be, "ldbm index init", 0, e, 1, 0, NULL);
+ slapi_entry_free(e);
+ }
e = ldbm_instance_init_config_entry("objectclass", "eq", 0, 0, 0, 0, 0);
ldbm_instance_config_add_index_entry(inst, e, flags);
@@ -288,10 +293,14 @@ ldbm_instance_create_default_indexes(backend *be)
* ancestorid is special, there is actually no such attr type
* but we still want to use the attr index file APIs.
*/
- e = ldbm_instance_init_config_entry(LDBM_ANCESTORID_STR, "eq", 0, 0, 0, "integerOrderingMatch", ancestorid_indexes_limit);
- ldbm_instance_config_add_index_entry(inst, e, flags);
- attr_index_config(be, "ldbm index init", 0, e, 1, 0, NULL);
- slapi_entry_free(e);
+ ainfo_get(be, (char *)LDBM_ANCESTORID_STR, &ai);
+ index_already_configured = ai;
+ if (!index_already_configured) {
+ e = ldbm_instance_init_config_entry(LDBM_ANCESTORID_STR, "eq", 0, 0, 0, "integerOrderingMatch", ancestorid_indexes_limit);
+ ldbm_instance_config_add_index_entry(inst, e, flags);
+ attr_index_config(be, "ldbm index init", 0, e, 1, 0, NULL);
+ slapi_entry_free(e);
+ }
slapi_ch_free_string(&ancestorid_indexes_limit);
slapi_ch_free_string(&parentid_indexes_limit);
diff --git a/ldap/servers/slapd/upgrade.c b/ldap/servers/slapd/upgrade.c
index 858392564..b02e37ed6 100644
--- a/ldap/servers/slapd/upgrade.c
+++ b/ldap/servers/slapd/upgrade.c
@@ -330,6 +330,107 @@ upgrade_remove_subtree_rename(void)
return UPGRADE_SUCCESS;
}
+/*
+ * Check if parentid/ancestorid indexes are missing the integerOrderingMatch
+ * matching rule.
+ *
+ * This function logs a warning if we detect this condition, advising
+ * the administrator to reindex the affected attributes.
+ */
+static upgrade_status
+upgrade_check_id_index_matching_rule(void)
+{
+ struct slapi_pblock *pb = slapi_pblock_new();
+ Slapi_Entry **backends = NULL;
+ const char *be_base_dn = "cn=ldbm database,cn=plugins,cn=config";
+ const char *be_filter = "(objectclass=nsBackendInstance)";
+ const char *attrs_to_check[] = {"parentid", "ancestorid", NULL};
+ upgrade_status uresult = UPGRADE_SUCCESS;
+
+ /* Search for all backend instances */
+ slapi_search_internal_set_pb(
+ pb, be_base_dn,
+ LDAP_SCOPE_ONELEVEL,
+ be_filter, NULL, 0, NULL, NULL,
+ plugin_get_default_component_id(), 0);
+ slapi_search_internal_pb(pb);
+ slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &backends);
+
+ if (backends) {
+ for (size_t be_idx = 0; backends[be_idx] != NULL; be_idx++) {
+ const char *be_name = slapi_entry_attr_get_ref(backends[be_idx], "cn");
+ if (!be_name) {
+ continue;
+ }
+
+ /* Check each attribute that should have integerOrderingMatch */
+ for (size_t attr_idx = 0; attrs_to_check[attr_idx] != NULL; attr_idx++) {
+ const char *attr_name = attrs_to_check[attr_idx];
+ struct slapi_pblock *idx_pb = slapi_pblock_new();
+ Slapi_Entry **idx_entries = NULL;
+ char *idx_dn = slapi_create_dn_string("cn=%s,cn=index,cn=%s,%s",
+ attr_name, be_name, be_base_dn);
+ char *idx_filter = "(objectclass=nsIndex)";
+ PRBool has_matching_rule = PR_FALSE;
+
+ if (!idx_dn) {
+ slapi_pblock_destroy(idx_pb);
+ continue;
+ }
+
+ slapi_search_internal_set_pb(
+ idx_pb, idx_dn,
+ LDAP_SCOPE_BASE,
+ idx_filter, NULL, 0, NULL, NULL,
+ plugin_get_default_component_id(), 0);
+ slapi_search_internal_pb(idx_pb);
+ slapi_pblock_get(idx_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &idx_entries);
+
+ if (idx_entries && idx_entries[0]) {
+ /* Index exists, check if it has integerOrderingMatch */
+ Slapi_Attr *mr_attr = NULL;
+ if (slapi_entry_attr_find(idx_entries[0], "nsMatchingRule", &mr_attr) == 0) {
+ Slapi_Value *sval = NULL;
+ int idx;
+ for (idx = slapi_attr_first_value(mr_attr, &sval);
+ idx != -1;
+ idx = slapi_attr_next_value(mr_attr, idx, &sval)) {
+ const struct berval *bval = slapi_value_get_berval(sval);
+ if (bval && bval->bv_val &&
+ strcasecmp(bval->bv_val, "integerOrderingMatch") == 0) {
+ has_matching_rule = PR_TRUE;
+ break;
+ }
+ }
+ }
+
+ if (!has_matching_rule) {
+ /* Index exists but doesn't have integerOrderingMatch, log a warning */
+ slapi_log_err(SLAPI_LOG_ERR, "upgrade_check_id_index_matching_rule",
+ "Index '%s' in backend '%s' is missing 'nsMatchingRule: integerOrderingMatch'. "
+ "Incorrectly configured system indexes can lead to poor search performance, replication issues, and other operational problems. "
+ "To fix this, add the matching rule and reindex: "
+ "dsconf <instance> backend index set --add-mr integerOrderingMatch --attr %s %s && "
+ "dsconf <instance> backend index reindex --attr %s %s. "
+ "WARNING: Reindexing can be resource-intensive and may impact server performance on a live system. "
+ "Consider scheduling reindexing during maintenance windows or periods of low activity.\n",
+ attr_name, be_name, attr_name, be_name, attr_name, be_name);
+ }
+ }
+
+ slapi_ch_free_string(&idx_dn);
+ slapi_free_search_results_internal(idx_pb);
+ slapi_pblock_destroy(idx_pb);
+ }
+ }
+ }
+
+ slapi_free_search_results_internal(pb);
+ slapi_pblock_destroy(pb);
+
+ return uresult;
+}
+
/*
* Upgrade the base config of the PAM PTA plugin.
*
@@ -547,7 +648,11 @@ upgrade_server(void)
if (upgrade_pam_pta_default_config() != UPGRADE_SUCCESS) {
return UPGRADE_FAILURE;
}
-
+
+ if (upgrade_check_id_index_matching_rule() != UPGRADE_SUCCESS) {
+ return UPGRADE_FAILURE;
+ }
+
return UPGRADE_SUCCESS;
}
--
2.52.0

View file

@ -1,67 +0,0 @@
From f5de84e309d5a4435198c9cc9b31b5722979f1ff Mon Sep 17 00:00:00 2001
From: Viktor Ashirov <vashirov@redhat.com>
Date: Mon, 12 Jan 2026 10:58:02 +0100
Subject: [PATCH 5/5] Issue 7172 - (2nd) Index ordering mismatch after upgrade
(#7180)
Commit 742c12e0247ab64e87da000a4de2f3e5c99044ab introduced a regression
where the check to skip creating parentid/ancestorid indexes if they
already exist was incorrect.
The `ainfo_get()` function falls back to returning
LDBM_PSEUDO_ATTR_DEFAULT attrinfo when the requested attribute is not
found.
Since LDBM_PSEUDO_ATTR_DEFAULT is created before the ancestorid check,
`ainfo_get()` returns LDBM_PSEUDO_ATTR_DEFAULT instead of NULL, causing
the ancestorid index creation to be skipped entirely.
When operations later try to use the ancestorid index, they fall back to
LDBM_PSEUDO_ATTR_DEFAULT, and attempting to open the .default dbi
mid-transaction fails with MDB_NOTFOUND (-30798).
Fix Description:
Instead of just checking if `ainfo_get()` returns non-NULL, verify that
the returned attrinfo is actually for the requested attribute.
Fixes: https://github.com/389ds/389-ds-base/issues/7172
Reviewed by: @tbordaz (Thanks!)
---
ldap/servers/slapd/back-ldbm/instance.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/instance.c b/ldap/servers/slapd/back-ldbm/instance.c
index 71bf0f6fa..2a6e8cbb8 100644
--- a/ldap/servers/slapd/back-ldbm/instance.c
+++ b/ldap/servers/slapd/back-ldbm/instance.c
@@ -190,7 +190,7 @@ ldbm_instance_create_default_indexes(backend *be)
char *ancestorid_indexes_limit = NULL;
char *parentid_indexes_limit = NULL;
struct attrinfo *ai = NULL;
- struct attrinfo *index_already_configured = NULL;
+ int index_already_configured = 0;
struct index_idlistsizeinfo *iter;
int cookie;
int limit;
@@ -250,7 +250,8 @@ ldbm_instance_create_default_indexes(backend *be)
slapi_entry_free(e);
ainfo_get(be, (char *)LDBM_PARENTID_STR, &ai);
- index_already_configured = ai;
+ /* Check if the attrinfo is actually for parentid, not a fallback to .default */
+ index_already_configured = (ai != NULL && strcmp(ai->ai_type, LDBM_PARENTID_STR) == 0);
if (!index_already_configured) {
e = ldbm_instance_init_config_entry(LDBM_PARENTID_STR, "eq", 0, 0, 0, "integerOrderingMatch", parentid_indexes_limit);
ldbm_instance_config_add_index_entry(inst, e, flags);
@@ -294,7 +295,8 @@ ldbm_instance_create_default_indexes(backend *be)
* but we still want to use the attr index file APIs.
*/
ainfo_get(be, (char *)LDBM_ANCESTORID_STR, &ai);
- index_already_configured = ai;
+ /* Check if the attrinfo is actually for ancestorid, not a fallback to .default */
+ index_already_configured = (ai != NULL && strcmp(ai->ai_type, LDBM_ANCESTORID_STR) == 0);
if (!index_already_configured) {
e = ldbm_instance_init_config_entry(LDBM_ANCESTORID_STR, "eq", 0, 0, 0, "integerOrderingMatch", ancestorid_indexes_limit);
ldbm_instance_config_add_index_entry(inst, e, flags);
--
2.52.0

View file

@ -3,18 +3,14 @@
# Exclude i686 bit arches
ExcludeArch: i686
%bcond bundle_jemalloc 1
%bcond_without bundle_jemalloc
%if %{with bundle_jemalloc}
%global jemalloc_name jemalloc
%global jemalloc_ver 5.3.0
%global __provides_exclude ^libjemalloc\\.so.*$
%endif
%bcond bundle_libdb 0
%if 0%{?rhel} >= 10
%bcond bundle_libdb 1
%endif
%bcond_with bundle_libdb
%if %{with bundle_libdb}
%global libdb_version 5.3
%global libdb_base_version db-%{libdb_version}.28
@ -28,27 +24,22 @@ ExcludeArch: i686
%endif
%endif
%bcond libbdb_ro 0
%if 0%{?fedora} >= 43
%bcond libbdb_ro 1
%endif
# This is used in certain builds to help us know if it has extra features.
%global variant base
# This enables a sanitized build.
%bcond asan 0
%bcond msan 0
%bcond tsan 0
%bcond ubsan 0
%bcond_with asan
%bcond_with msan
%bcond_with tsan
%bcond_with ubsan
%if %{with asan} || %{with msan} || %{with tsan} || %{with ubsan}
%global variant base-xsan
%endif
# Use Clang instead of GCC
%bcond clang 0
%bcond_with clang
%if %{with msan}
%bcond clang 1
%bcond_without clang
%endif
%if %{with clang}
@ -57,7 +48,7 @@ ExcludeArch: i686
%endif
# Build cockpit plugin
%bcond cockpit 1
%bcond_without cockpit
# fedora 15 and later uses tmpfiles.d
# otherwise, comment this out
@ -75,96 +66,103 @@ ExcludeArch: i686
Summary: 389 Directory Server (%{variant})
Name: 389-ds-base
Version: 3.2.0
Version: 3.1.1
Release: %{autorelease -n %{?with_asan:-e asan}}%{?dist}
License: GPL-3.0-or-later WITH GPL-3.0-389-ds-base-exception AND (0BSD OR Apache-2.0 OR MIT) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT) AND (CC-BY-4.0 AND MIT) AND (MIT OR Apache-2.0) AND Unicode-3.0 AND (MIT OR CC0-1.0) AND (MIT OR Unlicense) AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MIT AND ISC AND MPL-2.0 AND PSF-2.0 AND Zlib
License: GPL-3.0-or-later AND (0BSD OR Apache-2.0 OR MIT) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT) AND (CC-BY-4.0 AND MIT) AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND (MIT OR CC0-1.0) AND (MIT OR Unlicense) AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MIT AND ISC AND MPL-2.0 AND PSF-2.0
URL: https://www.port389.org
Obsoletes: %{name}-legacy-tools < 1.4.4.6
Obsoletes: %{name}-legacy-tools-debuginfo < 1.4.4.6
Provides: ldif2ldbm >= 0
##### Bundled cargo crates list - START #####
Provides: bundled(crate(addr2line)) = 0.24.2
Provides: bundled(crate(adler2)) = 2.0.1
Provides: bundled(crate(allocator-api2)) = 0.2.21
Provides: bundled(crate(addr2line)) = 0.22.0
Provides: bundled(crate(adler)) = 1.0.2
Provides: bundled(crate(ahash)) = 0.7.8
Provides: bundled(crate(atty)) = 0.2.14
Provides: bundled(crate(autocfg)) = 1.5.0
Provides: bundled(crate(backtrace)) = 0.3.75
Provides: bundled(crate(autocfg)) = 1.3.0
Provides: bundled(crate(backtrace)) = 0.3.73
Provides: bundled(crate(base64)) = 0.13.1
Provides: bundled(crate(bitflags)) = 2.9.1
Provides: bundled(crate(bitflags)) = 2.6.0
Provides: bundled(crate(byteorder)) = 1.5.0
Provides: bundled(crate(cbindgen)) = 0.26.0
Provides: bundled(crate(cc)) = 1.2.27
Provides: bundled(crate(cfg-if)) = 1.0.1
Provides: bundled(crate(cc)) = 1.1.7
Provides: bundled(crate(cfg-if)) = 1.0.0
Provides: bundled(crate(clap)) = 3.2.25
Provides: bundled(crate(clap_lex)) = 0.2.4
Provides: bundled(crate(concread)) = 0.5.6
Provides: bundled(crate(concread)) = 0.2.21
Provides: bundled(crate(crossbeam)) = 0.8.4
Provides: bundled(crate(crossbeam-channel)) = 0.5.13
Provides: bundled(crate(crossbeam-deque)) = 0.8.5
Provides: bundled(crate(crossbeam-epoch)) = 0.9.18
Provides: bundled(crate(crossbeam-queue)) = 0.3.12
Provides: bundled(crate(crossbeam-utils)) = 0.8.21
Provides: bundled(crate(equivalent)) = 1.0.2
Provides: bundled(crate(errno)) = 0.3.12
Provides: bundled(crate(fastrand)) = 2.3.0
Provides: bundled(crate(crossbeam-queue)) = 0.3.11
Provides: bundled(crate(crossbeam-utils)) = 0.8.20
Provides: bundled(crate(errno)) = 0.3.9
Provides: bundled(crate(fastrand)) = 2.1.0
Provides: bundled(crate(fernet)) = 0.1.4
Provides: bundled(crate(foldhash)) = 0.1.5
Provides: bundled(crate(foreign-types)) = 0.3.2
Provides: bundled(crate(foreign-types-shared)) = 0.1.1
Provides: bundled(crate(getrandom)) = 0.3.3
Provides: bundled(crate(gimli)) = 0.31.1
Provides: bundled(crate(hashbrown)) = 0.15.4
Provides: bundled(crate(getrandom)) = 0.2.15
Provides: bundled(crate(gimli)) = 0.29.0
Provides: bundled(crate(hashbrown)) = 0.12.3
Provides: bundled(crate(heck)) = 0.4.1
Provides: bundled(crate(hermit-abi)) = 0.1.19
Provides: bundled(crate(indexmap)) = 1.9.3
Provides: bundled(crate(itoa)) = 1.0.15
Provides: bundled(crate(jobserver)) = 0.1.33
Provides: bundled(crate(libc)) = 0.2.174
Provides: bundled(crate(linux-raw-sys)) = 0.9.4
Provides: bundled(crate(log)) = 0.4.27
Provides: bundled(crate(lru)) = 0.13.0
Provides: bundled(crate(memchr)) = 2.7.5
Provides: bundled(crate(miniz_oxide)) = 0.8.9
Provides: bundled(crate(object)) = 0.36.7
Provides: bundled(crate(once_cell)) = 1.21.3
Provides: bundled(crate(openssl)) = 0.10.73
Provides: bundled(crate(instant)) = 0.1.13
Provides: bundled(crate(itoa)) = 1.0.11
Provides: bundled(crate(jobserver)) = 0.1.32
Provides: bundled(crate(libc)) = 0.2.155
Provides: bundled(crate(linux-raw-sys)) = 0.4.14
Provides: bundled(crate(lock_api)) = 0.4.12
Provides: bundled(crate(log)) = 0.4.22
Provides: bundled(crate(lru)) = 0.7.8
Provides: bundled(crate(memchr)) = 2.7.4
Provides: bundled(crate(miniz_oxide)) = 0.7.4
Provides: bundled(crate(object)) = 0.36.2
Provides: bundled(crate(once_cell)) = 1.19.0
Provides: bundled(crate(openssl)) = 0.10.66
Provides: bundled(crate(openssl-macros)) = 0.1.1
Provides: bundled(crate(openssl-sys)) = 0.9.109
Provides: bundled(crate(openssl-sys)) = 0.9.103
Provides: bundled(crate(os_str_bytes)) = 6.6.1
Provides: bundled(crate(parking_lot)) = 0.11.2
Provides: bundled(crate(parking_lot_core)) = 0.8.6
Provides: bundled(crate(paste)) = 0.1.18
Provides: bundled(crate(paste-impl)) = 0.1.18
Provides: bundled(crate(pin-project-lite)) = 0.2.16
Provides: bundled(crate(pkg-config)) = 0.3.32
Provides: bundled(crate(pin-project-lite)) = 0.2.14
Provides: bundled(crate(pkg-config)) = 0.3.30
Provides: bundled(crate(ppv-lite86)) = 0.2.18
Provides: bundled(crate(proc-macro-hack)) = 0.5.20+deprecated
Provides: bundled(crate(proc-macro2)) = 1.0.95
Provides: bundled(crate(quote)) = 1.0.40
Provides: bundled(crate(r-efi)) = 5.3.0
Provides: bundled(crate(rustc-demangle)) = 0.1.25
Provides: bundled(crate(rustix)) = 1.0.7
Provides: bundled(crate(ryu)) = 1.0.20
Provides: bundled(crate(serde)) = 1.0.219
Provides: bundled(crate(serde_derive)) = 1.0.219
Provides: bundled(crate(serde_json)) = 1.0.140
Provides: bundled(crate(shlex)) = 1.3.0
Provides: bundled(crate(smallvec)) = 1.15.1
Provides: bundled(crate(sptr)) = 0.3.2
Provides: bundled(crate(proc-macro2)) = 1.0.86
Provides: bundled(crate(quote)) = 1.0.36
Provides: bundled(crate(rand)) = 0.8.5
Provides: bundled(crate(rand_chacha)) = 0.3.1
Provides: bundled(crate(rand_core)) = 0.6.4
Provides: bundled(crate(redox_syscall)) = 0.2.16
Provides: bundled(crate(rustc-demangle)) = 0.1.24
Provides: bundled(crate(rustix)) = 0.38.34
Provides: bundled(crate(ryu)) = 1.0.18
Provides: bundled(crate(scopeguard)) = 1.2.0
Provides: bundled(crate(serde)) = 1.0.204
Provides: bundled(crate(serde_derive)) = 1.0.204
Provides: bundled(crate(serde_json)) = 1.0.121
Provides: bundled(crate(smallvec)) = 1.13.2
Provides: bundled(crate(strsim)) = 0.10.0
Provides: bundled(crate(syn)) = 2.0.103
Provides: bundled(crate(tempfile)) = 3.20.0
Provides: bundled(crate(syn)) = 2.0.72
Provides: bundled(crate(tempfile)) = 3.10.1
Provides: bundled(crate(termcolor)) = 1.4.1
Provides: bundled(crate(textwrap)) = 0.16.2
Provides: bundled(crate(tokio)) = 1.45.1
Provides: bundled(crate(textwrap)) = 0.16.1
Provides: bundled(crate(tokio)) = 1.39.2
Provides: bundled(crate(tokio-macros)) = 2.4.0
Provides: bundled(crate(toml)) = 0.5.11
Provides: bundled(crate(tracing)) = 0.1.41
Provides: bundled(crate(tracing-attributes)) = 0.1.30
Provides: bundled(crate(tracing-core)) = 0.1.34
Provides: bundled(crate(unicode-ident)) = 1.0.18
Provides: bundled(crate(unicode-ident)) = 1.0.12
Provides: bundled(crate(uuid)) = 0.8.2
Provides: bundled(crate(vcpkg)) = 0.2.15
Provides: bundled(crate(wasi)) = 0.14.2+wasi_0.2.4
Provides: bundled(crate(version_check)) = 0.9.5
Provides: bundled(crate(wasi)) = 0.11.0+wasi_snapshot_preview1
Provides: bundled(crate(winapi)) = 0.3.9
Provides: bundled(crate(winapi-i686-pc-windows-gnu)) = 0.4.0
Provides: bundled(crate(winapi-util)) = 0.1.9
Provides: bundled(crate(winapi-util)) = 0.1.8
Provides: bundled(crate(winapi-x86_64-pc-windows-gnu)) = 0.4.0
Provides: bundled(crate(windows-sys)) = 0.59.0
Provides: bundled(crate(windows-sys)) = 0.52.0
Provides: bundled(crate(windows-targets)) = 0.52.6
Provides: bundled(crate(windows_aarch64_gnullvm)) = 0.52.6
Provides: bundled(crate(windows_aarch64_msvc)) = 0.52.6
@ -174,60 +172,57 @@ Provides: bundled(crate(windows_i686_msvc)) = 0.52.6
Provides: bundled(crate(windows_x86_64_gnu)) = 0.52.6
Provides: bundled(crate(windows_x86_64_gnullvm)) = 0.52.6
Provides: bundled(crate(windows_x86_64_msvc)) = 0.52.6
Provides: bundled(crate(wit-bindgen-rt)) = 0.39.0
Provides: bundled(crate(zerocopy)) = 0.6.6
Provides: bundled(crate(zerocopy-derive)) = 0.6.6
Provides: bundled(crate(zeroize)) = 1.8.1
Provides: bundled(crate(zeroize_derive)) = 1.4.2
Provides: bundled(npm(@eslint-community/eslint-utils)) = 4.4.1
Provides: bundled(npm(@eslint-community/regexpp)) = 4.12.1
Provides: bundled(npm(@eslint/eslintrc)) = 2.1.4
Provides: bundled(npm(@eslint/js)) = 8.57.1
Provides: bundled(npm(@aashutoshrathi/word-wrap)) = 1.2.6
Provides: bundled(npm(@eslint-community/eslint-utils)) = 4.4.0
Provides: bundled(npm(@eslint-community/regexpp)) = 4.5.1
Provides: bundled(npm(@eslint/eslintrc)) = 2.0.3
Provides: bundled(npm(@eslint/js)) = 8.42.0
Provides: bundled(npm(@fortawesome/fontawesome-common-types)) = 0.2.36
Provides: bundled(npm(@fortawesome/fontawesome-svg-core)) = 1.2.36
Provides: bundled(npm(@fortawesome/free-solid-svg-icons)) = 5.15.4
Provides: bundled(npm(@fortawesome/react-fontawesome)) = 0.1.19
Provides: bundled(npm(@humanwhocodes/config-array)) = 0.13.0
Provides: bundled(npm(@humanwhocodes/config-array)) = 0.11.10
Provides: bundled(npm(@humanwhocodes/module-importer)) = 1.0.1
Provides: bundled(npm(@humanwhocodes/object-schema)) = 2.0.3
Provides: bundled(npm(@humanwhocodes/object-schema)) = 1.2.1
Provides: bundled(npm(@nodelib/fs.scandir)) = 2.1.5
Provides: bundled(npm(@nodelib/fs.stat)) = 2.0.5
Provides: bundled(npm(@nodelib/fs.walk)) = 1.2.8
Provides: bundled(npm(@patternfly/patternfly)) = 5.4.1
Provides: bundled(npm(@patternfly/react-charts)) = 7.4.3
Provides: bundled(npm(@patternfly/react-core)) = 5.4.1
Provides: bundled(npm(@patternfly/react-icons)) = 5.4.0
Provides: bundled(npm(@patternfly/react-log-viewer)) = 5.3.0
Provides: bundled(npm(@patternfly/react-styles)) = 5.4.0
Provides: bundled(npm(@patternfly/react-table)) = 5.4.1
Provides: bundled(npm(@patternfly/react-tokens)) = 5.4.0
Provides: bundled(npm(@types/d3-array)) = 3.2.1
Provides: bundled(npm(@types/d3-color)) = 3.1.3
Provides: bundled(npm(@types/d3-ease)) = 3.0.2
Provides: bundled(npm(@types/d3-interpolate)) = 3.0.4
Provides: bundled(npm(@types/d3-path)) = 3.1.0
Provides: bundled(npm(@types/d3-scale)) = 4.0.8
Provides: bundled(npm(@types/d3-shape)) = 3.1.6
Provides: bundled(npm(@types/d3-time)) = 3.0.3
Provides: bundled(npm(@types/d3-timer)) = 3.0.2
Provides: bundled(npm(@ungap/structured-clone)) = 1.2.0
Provides: bundled(npm(@xterm/addon-canvas)) = 0.7.0
Provides: bundled(npm(@xterm/xterm)) = 5.5.0
Provides: bundled(npm(acorn)) = 8.14.0
Provides: bundled(npm(@patternfly/patternfly)) = 4.224.2
Provides: bundled(npm(@patternfly/react-charts)) = 6.94.19
Provides: bundled(npm(@patternfly/react-core)) = 4.276.8
Provides: bundled(npm(@patternfly/react-icons)) = 4.93.6
Provides: bundled(npm(@patternfly/react-styles)) = 4.92.6
Provides: bundled(npm(@patternfly/react-table)) = 4.113.0
Provides: bundled(npm(@patternfly/react-tokens)) = 4.94.6
Provides: bundled(npm(@types/d3-array)) = 3.0.5
Provides: bundled(npm(@types/d3-color)) = 3.1.0
Provides: bundled(npm(@types/d3-ease)) = 3.0.0
Provides: bundled(npm(@types/d3-interpolate)) = 3.0.1
Provides: bundled(npm(@types/d3-path)) = 3.0.0
Provides: bundled(npm(@types/d3-scale)) = 4.0.3
Provides: bundled(npm(@types/d3-shape)) = 3.1.1
Provides: bundled(npm(@types/d3-time)) = 3.0.0
Provides: bundled(npm(@types/d3-timer)) = 3.0.0
Provides: bundled(npm(acorn)) = 8.8.2
Provides: bundled(npm(acorn-jsx)) = 5.3.2
Provides: bundled(npm(ajv)) = 6.12.6
Provides: bundled(npm(ansi-regex)) = 5.0.1
Provides: bundled(npm(ansi-styles)) = 4.3.0
Provides: bundled(npm(argparse)) = 2.0.1
Provides: bundled(npm(attr-accept)) = 2.2.4
Provides: bundled(npm(autolinker)) = 3.16.2
Provides: bundled(npm(attr-accept)) = 1.1.3
Provides: bundled(npm(balanced-match)) = 1.0.2
Provides: bundled(npm(brace-expansion)) = 1.1.12
Provides: bundled(npm(brace-expansion)) = 1.1.11
Provides: bundled(npm(callsites)) = 3.1.0
Provides: bundled(npm(chalk)) = 4.1.2
Provides: bundled(npm(color-convert)) = 2.0.1
Provides: bundled(npm(color-name)) = 1.1.4
Provides: bundled(npm(concat-map)) = 0.0.1
Provides: bundled(npm(core-util-is)) = 1.0.3
Provides: bundled(npm(cross-spawn)) = 7.0.6
Provides: bundled(npm(core-js)) = 2.6.12
Provides: bundled(npm(cross-spawn)) = 7.0.3
Provides: bundled(npm(d3-array)) = 3.2.4
Provides: bundled(npm(d3-color)) = 3.1.0
Provides: bundled(npm(d3-ease)) = 3.0.1
@ -239,43 +234,42 @@ Provides: bundled(npm(d3-shape)) = 3.2.0
Provides: bundled(npm(d3-time)) = 3.1.0
Provides: bundled(npm(d3-time-format)) = 4.1.0
Provides: bundled(npm(d3-timer)) = 3.0.1
Provides: bundled(npm(debug)) = 4.3.7
Provides: bundled(npm(debug)) = 4.3.4
Provides: bundled(npm(deep-is)) = 0.1.4
Provides: bundled(npm(delaunator)) = 4.0.1
Provides: bundled(npm(delaunay-find)) = 0.0.6
Provides: bundled(npm(dequal)) = 2.0.3
Provides: bundled(npm(doctrine)) = 3.0.0
Provides: bundled(npm(encoding)) = 0.1.13
Provides: bundled(npm(escape-string-regexp)) = 4.0.0
Provides: bundled(npm(eslint)) = 8.57.1
Provides: bundled(npm(eslint-plugin-react-hooks)) = 4.6.2
Provides: bundled(npm(eslint-scope)) = 7.2.2
Provides: bundled(npm(eslint-visitor-keys)) = 3.4.3
Provides: bundled(npm(espree)) = 9.6.1
Provides: bundled(npm(esquery)) = 1.6.0
Provides: bundled(npm(eslint)) = 8.42.0
Provides: bundled(npm(eslint-plugin-react-hooks)) = 4.6.0
Provides: bundled(npm(eslint-scope)) = 7.2.0
Provides: bundled(npm(eslint-visitor-keys)) = 3.4.1
Provides: bundled(npm(espree)) = 9.5.2
Provides: bundled(npm(esquery)) = 1.5.0
Provides: bundled(npm(esrecurse)) = 4.3.0
Provides: bundled(npm(estraverse)) = 5.3.0
Provides: bundled(npm(esutils)) = 2.0.3
Provides: bundled(npm(fast-deep-equal)) = 3.1.3
Provides: bundled(npm(fast-json-stable-stringify)) = 2.1.0
Provides: bundled(npm(fast-levenshtein)) = 2.0.6
Provides: bundled(npm(fastq)) = 1.17.1
Provides: bundled(npm(fastq)) = 1.15.0
Provides: bundled(npm(file-entry-cache)) = 6.0.1
Provides: bundled(npm(file-selector)) = 2.1.0
Provides: bundled(npm(file-selector)) = 0.1.19
Provides: bundled(npm(find-up)) = 5.0.0
Provides: bundled(npm(flat-cache)) = 3.2.0
Provides: bundled(npm(flatted)) = 3.3.1
Provides: bundled(npm(focus-trap)) = 7.5.4
Provides: bundled(npm(flat-cache)) = 3.0.4
Provides: bundled(npm(flatted)) = 3.2.7
Provides: bundled(npm(focus-trap)) = 6.9.2
Provides: bundled(npm(fs.realpath)) = 1.0.0
Provides: bundled(npm(gettext-parser)) = 2.1.0
Provides: bundled(npm(gettext-parser)) = 2.0.0
Provides: bundled(npm(glob)) = 7.2.3
Provides: bundled(npm(glob-parent)) = 6.0.2
Provides: bundled(npm(globals)) = 13.24.0
Provides: bundled(npm(globals)) = 13.20.0
Provides: bundled(npm(graphemer)) = 1.4.0
Provides: bundled(npm(has-flag)) = 4.0.0
Provides: bundled(npm(hoist-non-react-statics)) = 3.3.2
Provides: bundled(npm(iconv-lite)) = 0.6.3
Provides: bundled(npm(ignore)) = 5.3.2
Provides: bundled(npm(ignore)) = 5.2.4
Provides: bundled(npm(import-fresh)) = 3.3.0
Provides: bundled(npm(imurmurhash)) = 0.1.4
Provides: bundled(npm(inflight)) = 1.0.6
@ -284,95 +278,82 @@ Provides: bundled(npm(internmap)) = 2.0.3
Provides: bundled(npm(is-extglob)) = 2.1.1
Provides: bundled(npm(is-glob)) = 4.0.3
Provides: bundled(npm(is-path-inside)) = 3.0.3
Provides: bundled(npm(isarray)) = 1.0.0
Provides: bundled(npm(isexe)) = 2.0.0
Provides: bundled(npm(js-sha1)) = 0.7.0
Provides: bundled(npm(js-sha256)) = 0.11.0
Provides: bundled(npm(js-tokens)) = 4.0.0
Provides: bundled(npm(js-yaml)) = 4.1.1
Provides: bundled(npm(json-buffer)) = 3.0.1
Provides: bundled(npm(js-yaml)) = 4.1.0
Provides: bundled(npm(json-schema-traverse)) = 0.4.1
Provides: bundled(npm(json-stable-stringify-without-jsonify)) = 1.0.1
Provides: bundled(npm(json-stringify-safe)) = 5.0.1
Provides: bundled(npm(keyv)) = 4.5.4
Provides: bundled(npm(levn)) = 0.4.1
Provides: bundled(npm(locate-path)) = 6.0.0
Provides: bundled(npm(lodash)) = 4.17.21
Provides: bundled(npm(lodash.merge)) = 4.6.2
Provides: bundled(npm(loose-envify)) = 1.4.0
Provides: bundled(npm(memoize-one)) = 5.2.1
Provides: bundled(npm(minimatch)) = 3.1.2
Provides: bundled(npm(ms)) = 2.1.3
Provides: bundled(npm(ms)) = 2.1.2
Provides: bundled(npm(natural-compare)) = 1.4.0
Provides: bundled(npm(object-assign)) = 4.1.1
Provides: bundled(npm(once)) = 1.4.0
Provides: bundled(npm(optionator)) = 0.9.4
Provides: bundled(npm(optionator)) = 0.9.3
Provides: bundled(npm(p-limit)) = 3.1.0
Provides: bundled(npm(p-locate)) = 5.0.0
Provides: bundled(npm(parent-module)) = 1.0.1
Provides: bundled(npm(path-exists)) = 4.0.0
Provides: bundled(npm(path-is-absolute)) = 1.0.1
Provides: bundled(npm(path-key)) = 3.1.1
Provides: bundled(npm(popper.js)) = 1.16.1
Provides: bundled(npm(prelude-ls)) = 1.2.1
Provides: bundled(npm(prettier)) = 3.3.3
Provides: bundled(npm(process-nextick-args)) = 2.0.1
Provides: bundled(npm(prop-types)) = 15.8.1
Provides: bundled(npm(punycode)) = 2.3.1
Provides: bundled(npm(prop-types-extra)) = 1.1.1
Provides: bundled(npm(punycode)) = 2.3.0
Provides: bundled(npm(queue-microtask)) = 1.2.3
Provides: bundled(npm(react)) = 18.3.1
Provides: bundled(npm(react-dom)) = 18.3.1
Provides: bundled(npm(react-dropzone)) = 14.3.5
Provides: bundled(npm(react)) = 17.0.2
Provides: bundled(npm(react-dom)) = 17.0.2
Provides: bundled(npm(react-dropzone)) = 9.0.0
Provides: bundled(npm(react-fast-compare)) = 3.2.2
Provides: bundled(npm(react-is)) = 16.13.1
Provides: bundled(npm(readable-stream)) = 2.3.8
Provides: bundled(npm(remarkable)) = 2.0.1
Provides: bundled(npm(resolve-from)) = 4.0.0
Provides: bundled(npm(reusify)) = 1.0.4
Provides: bundled(npm(rimraf)) = 3.0.2
Provides: bundled(npm(run-parallel)) = 1.2.0
Provides: bundled(npm(safe-buffer)) = 5.2.1
Provides: bundled(npm(safer-buffer)) = 2.1.2
Provides: bundled(npm(scheduler)) = 0.23.2
Provides: bundled(npm(scheduler)) = 0.20.2
Provides: bundled(npm(shebang-command)) = 2.0.0
Provides: bundled(npm(shebang-regex)) = 3.0.0
Provides: bundled(npm(sprintf-js)) = 1.0.3
Provides: bundled(npm(string_decoder)) = 1.1.1
Provides: bundled(npm(strip-ansi)) = 6.0.1
Provides: bundled(npm(strip-json-comments)) = 3.1.1
Provides: bundled(npm(supports-color)) = 7.2.0
Provides: bundled(npm(tabbable)) = 6.2.0
Provides: bundled(npm(tabbable)) = 5.3.3
Provides: bundled(npm(text-table)) = 0.2.0
Provides: bundled(npm(throttle-debounce)) = 5.0.2
Provides: bundled(npm(tslib)) = 2.8.1
Provides: bundled(npm(tippy.js)) = 5.1.2
Provides: bundled(npm(tslib)) = 2.5.3
Provides: bundled(npm(type-check)) = 0.4.0
Provides: bundled(npm(type-fest)) = 0.20.2
Provides: bundled(npm(uri-js)) = 4.4.1
Provides: bundled(npm(util-deprecate)) = 1.0.2
Provides: bundled(npm(uuid)) = 10.0.0
Provides: bundled(npm(victory-area)) = 37.3.1
Provides: bundled(npm(victory-axis)) = 37.3.1
Provides: bundled(npm(victory-bar)) = 37.3.1
Provides: bundled(npm(victory-box-plot)) = 37.3.1
Provides: bundled(npm(victory-brush-container)) = 37.3.1
Provides: bundled(npm(victory-chart)) = 37.3.1
Provides: bundled(npm(victory-core)) = 37.3.1
Provides: bundled(npm(victory-create-container)) = 37.3.1
Provides: bundled(npm(victory-cursor-container)) = 37.3.1
Provides: bundled(npm(victory-group)) = 37.3.1
Provides: bundled(npm(victory-legend)) = 37.3.1
Provides: bundled(npm(victory-line)) = 37.3.1
Provides: bundled(npm(victory-pie)) = 37.3.1
Provides: bundled(npm(victory-polar-axis)) = 37.3.1
Provides: bundled(npm(victory-scatter)) = 37.3.1
Provides: bundled(npm(victory-selection-container)) = 37.3.1
Provides: bundled(npm(victory-shared-events)) = 37.3.1
Provides: bundled(npm(victory-stack)) = 37.3.1
Provides: bundled(npm(victory-tooltip)) = 37.3.1
Provides: bundled(npm(victory-vendor)) = 37.3.1
Provides: bundled(npm(victory-voronoi-container)) = 37.3.1
Provides: bundled(npm(victory-zoom-container)) = 37.3.1
Provides: bundled(npm(victory-area)) = 36.6.10
Provides: bundled(npm(victory-axis)) = 36.6.10
Provides: bundled(npm(victory-bar)) = 36.6.10
Provides: bundled(npm(victory-brush-container)) = 36.6.10
Provides: bundled(npm(victory-chart)) = 36.6.10
Provides: bundled(npm(victory-core)) = 36.6.10
Provides: bundled(npm(victory-create-container)) = 36.6.10
Provides: bundled(npm(victory-cursor-container)) = 36.6.10
Provides: bundled(npm(victory-group)) = 36.6.10
Provides: bundled(npm(victory-legend)) = 36.6.10
Provides: bundled(npm(victory-line)) = 36.6.10
Provides: bundled(npm(victory-pie)) = 36.6.10
Provides: bundled(npm(victory-polar-axis)) = 36.6.10
Provides: bundled(npm(victory-scatter)) = 36.6.10
Provides: bundled(npm(victory-selection-container)) = 36.6.10
Provides: bundled(npm(victory-shared-events)) = 36.6.10
Provides: bundled(npm(victory-stack)) = 36.6.10
Provides: bundled(npm(victory-tooltip)) = 36.6.10
Provides: bundled(npm(victory-vendor)) = 36.6.10
Provides: bundled(npm(victory-voronoi-container)) = 36.6.10
Provides: bundled(npm(victory-zoom-container)) = 36.6.10
Provides: bundled(npm(warning)) = 4.0.3
Provides: bundled(npm(which)) = 2.0.2
Provides: bundled(npm(word-wrap)) = 1.2.5
Provides: bundled(npm(wrappy)) = 1.0.2
Provides: bundled(npm(yocto-queue)) = 0.1.0
##### Bundled cargo crates list - END #####
@ -389,7 +370,6 @@ BuildRequires: libicu-devel
BuildRequires: pcre2-devel
BuildRequires: cracklib-devel
BuildRequires: json-c-devel
BuildRequires: libxcrypt-devel
%if %{with clang}
BuildRequires: libatomic
BuildRequires: clang
@ -408,11 +388,9 @@ BuildRequires: libtsan
BuildRequires: libubsan
%endif
%endif
%if %{without libbdb_ro}
%if %{without bundle_libdb}
BuildRequires: libdb-devel
%endif
%endif
# The following are needed to build the snmp ldap-agent
BuildRequires: net-snmp-devel
@ -439,7 +417,18 @@ BuildRequires: doxygen
# For tests!
BuildRequires: libcmocka-devel
# For lib389 and related components.
BuildRequires: python%{python3_pkgversion}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-ldap
BuildRequires: python%{python3_pkgversion}-pyasn1
BuildRequires: python%{python3_pkgversion}-pyasn1-modules
BuildRequires: python%{python3_pkgversion}-dateutil
BuildRequires: python%{python3_pkgversion}-argcomplete
BuildRequires: python%{python3_pkgversion}-argparse-manpage
BuildRequires: python%{python3_pkgversion}-policycoreutils
BuildRequires: python%{python3_pkgversion}-libselinux
BuildRequires: python%{python3_pkgversion}-cryptography
# For cockpit
%if %{with cockpit}
@ -448,9 +437,6 @@ BuildRequires: npm
BuildRequires: nodejs
%endif
# For autosetup -S git
BuildRequires: git
Requires: %{name}-libs = %{version}-%{release}
Requires: python%{python3_pkgversion}-lib389 = %{version}-%{release}
@ -471,20 +457,14 @@ Requires: cyrus-sasl-md5
# This is optionally supported by us, as we use it in our tests
Requires: cyrus-sasl-plain
# this is needed for backldbm
%if %{with libbdb_ro}
Requires: %{name}-robdb-libs = %{version}-%{release}
%else
%if %{without bundle_libdb}
Requires: libdb
%endif
%endif
Requires: lmdb-libs
# Needed by logconv.pl
%if %{without libbdb_ro}
%if %{without bundle_libdb}
Requires: perl-DB_File
%endif
%endif
Requires: perl-Archive-Tar
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
Requires: perl-debugger
@ -495,27 +475,20 @@ Requires: cracklib-dicts
Requires: json-c
# Log compression
Requires: zlib-devel
# logconv.py, MIME type
Requires: python3-file-magic
# Picks up our systemd deps.
%{?systemd_requires}
Source0: https://github.com/389ds/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
Source0: %{name}-%{version}.tar.bz2
Source2: %{name}-devel.README
%if %{with bundle_jemalloc}
Source3: https://github.com/jemalloc/%{jemalloc_name}/releases/download/%{jemalloc_ver}/%{jemalloc_name}-%{jemalloc_ver}.tar.bz2
Source6: jemalloc-5.3.0_throw_bad_alloc.patch
%endif
Source4: 389-ds-base.sysusers
%if %{with bundle_libdb}
Source5: https://fedorapeople.org/groups/389ds/libdb-5.3.28-59.tar.bz2
%endif
Patch: 0001-Issue-7096-During-replication-online-total-init-the-.patch
Patch: 0002-Issue-Revise-paged-result-search-locking.patch
Patch: 0003-Issue-7108-Fix-shutdown-crash-in-entry-cache-destruc.patch
Patch: 0004-Issue-7172-Index-ordering-mismatch-after-upgrade-717.patch
Patch: 0005-Issue-7172-2nd-Index-ordering-mismatch-after-upgrade.patch
Patch1: 0001-Issue-6356-On-LMDB-after-an-update-the-impact-VLV-in.patch
%description
389 Directory Server is an LDAPv3 compliant server. The base package includes
@ -526,17 +499,6 @@ isn't what you want. Please contact support immediately.
Please see http://seclists.org/oss-sec/2016/q1/363 for more information.
%endif
%if %{with libbdb_ro}
%package robdb-libs
Summary: Read-only Berkeley Database Library
License: GPL-2.0-or-later OR LGPL-2.1-or-later
%description robdb-libs
The %{name}-robdb-lib package contains a library derived from rpm
project (https://github.com/rpm-software-management/rpm) that provides
some basic functions to search and read Berkeley Database records
%endif
%package libs
Summary: Core libraries for 389 Directory Server (%{variant})
@ -621,8 +583,18 @@ Requires: openssl
# This is for /usr/bin/c_rehash tool, only needed for openssl < 1.1.0
Requires: openssl-perl
Requires: iproute
Requires: python%{python3_pkgversion}
Requires: python%{python3_pkgversion}-distro
Requires: python%{python3_pkgversion}-ldap
Requires: python%{python3_pkgversion}-pyasn1
Requires: python%{python3_pkgversion}-pyasn1-modules
Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-argcomplete
Requires: python%{python3_pkgversion}-libselinux
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-cryptography
Recommends: bash-completion
%{?python_provide:%python_provide python%{python3_pkgversion}-lib389}
%description -n python%{python3_pkgversion}-lib389
This module contains tools and libraries for accessing, testing,
@ -641,14 +613,8 @@ Requires: python%{python3_pkgversion}-lib389 = %{version}-%{release}
A cockpit UI Plugin for configuring and administering the 389 Directory Server
%endif
%generate_buildrequires
cd src/lib389
# Tests do not run in %%check (lib389's tests need to be fixed)
# but test dependencies are needed to check import lib389.topologies
%pyproject_buildrequires -g test
%prep
%autosetup -S git -p1 -n %{name}-%{version}
%autosetup -p1 -v -n %{name}-%{version}
%if %{with bundle_jemalloc}
%setup -q -n %{name}-%{version} -T -D -b 3
@ -661,8 +627,6 @@ cd src/lib389
cp %{SOURCE2} README.devel
%build
# Workaround until https://github.com/389ds/389-ds-base/issues/6476 is fixed
export CFLAGS="%{optflags} -std=gnu17"
%if %{with clang}
CLANG_FLAGS="--enable-clang"
@ -712,12 +676,11 @@ COCKPIT_FLAGS="--disable-cockpit"
# Build jemalloc
pushd ../%{jemalloc_name}-%{jemalloc_ver}
patch -p1 -F3 < %{SOURCE6}
%configure \
--libdir=%{_libdir}/%{pkgname}/lib \
--bindir=%{_libdir}/%{pkgname}/bin \
--enable-prof %{lg_page} %{lg_hugepage}
%make_build
make %{?_smp_mflags}
popd
%endif
@ -727,7 +690,6 @@ mkdir -p ../%{libdb_base_version}
pushd ../%{libdb_base_version}
tar -xjf %{_topdir}/SOURCES/%{libdb_full_version}.tar.bz2
mv %{libdb_full_version} SOURCES
sed -i -e '/^CFLAGS=/s/-fno-strict-aliasing/& -std=gnu99/' %{_builddir}/%{name}-%{version}/rpm/bundle-libdb.spec
rpmbuild --define "_topdir $PWD" -bc %{_builddir}/%{name}-%{version}/rpm/bundle-libdb.spec
popd
%endif
@ -736,11 +698,6 @@ popd
autoreconf -fiv
%configure \
%if %{with libbdb_ro}
--with-libbdb-ro \
%else
--without-libbdb-ro \
%endif
%if %{with bundle_libdb}
--with-bundle-libdb=%{_builddir}/%{libdb_base_version}/BUILD/%{libdb_base_dir}/dist/dist-tls \
%endif
@ -762,15 +719,21 @@ autoreconf -fiv
%endif
# lib389
make src/lib389/setup.py
pushd ./src/lib389
%{python3} validate_version.py --update
%pyproject_wheel
%py3_build
popd
# argparse-manpage dynamic man pages have hardcoded man v1 in header,
# need to change it to v8
sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsconf.8
sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsctl.8
sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsidm.8
sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dscreate.8
# Generate symbolic info for debuggers
export XCFLAGS=$RPM_OPT_FLAGS
%make_build
make %{?_smp_mflags}
%install
@ -778,7 +741,7 @@ mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_sbindir}
%if %{with cockpit}
mkdir -p %{buildroot}%{_datadir}/cockpit
%endif
%make_install
make DESTDIR="$RPM_BUILD_ROOT" install
%if %{with cockpit}
find %{buildroot}%{_datadir}/cockpit/389-console -type d | sed -e "s@%{buildroot}@@" | sed -e 's/^/\%dir /' > cockpit.list
@ -795,8 +758,7 @@ cp -r %{_builddir}/%{name}-%{version}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3
# lib389
pushd src/lib389
%pyproject_install
%pyproject_save_files -l lib389
%py3_install
popd
# Register CLI tools for bash completion
@ -842,21 +804,6 @@ cp -pa $libdbbuilddir/dist/dist-tls/.libs/%{libdb_bundle_name} $RPM_BUILD_ROOT%{
popd
%endif
%if %{with libbdb_ro}
pushd lib/librobdb
cp -pa COPYING %{_builddir}/%{name}-%{version}/COPYING.librobdb
cp -pa COPYING.RPM %{_builddir}/%{name}-%{version}/COPYING.RPM
install -m 0755 -d %{buildroot}/%{_libdir}
install -m 0755 -d %{buildroot}/%{_docdir}/%{name}-robdb-libs
install -m 0755 -d %{buildroot}/%{_licensedir}/%{name}
install -m 0755 -d %{buildroot}/%{_licensedir}/%{name}-robdb-libs
install -m 0644 $PWD/README.md %{buildroot}/%{_docdir}/%{name}-robdb-libs/README.md
install -m 0644 $PWD/COPYING %{buildroot}/%{_licensedir}/%{name}-robdb-libs/COPYING
install -m 0644 $PWD/COPYING.RPM %{buildroot}/%{_licensedir}/%{name}-robdb-libs/COPYING.RPM
install -m 0644 $PWD/COPYING %{buildroot}/%{_licensedir}/%{name}/COPYING.librobdb
install -m 0644 $PWD/COPYING.RPM %{buildroot}/%{_licensedir}/%{name}/COPYING.RPM
popd
%endif
%check
# This checks the code, if it fails it prints why, then re-raises the fail to shortcircuit the rpm build.
@ -867,9 +814,6 @@ export TSAN_OPTIONS=print_stacktrace=1:second_deadlock_stack=1:history_size=7
if ! make DESTDIR="$RPM_BUILD_ROOT" check; then cat ./test-suite.log && false; fi
%endif
# Check import for lib389 modules
%pyproject_check_import -e '*.test*'
%post
if [ -n "$DEBUGPOSTTRANS" ] ; then
output=$DEBUGPOSTTRANS
@ -882,6 +826,11 @@ fi
# reload to pick up any changes to systemd files
/bin/systemctl daemon-reload >$output 2>&1 || :
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Soft_static_allocation
# Soft static allocation for UID and GID
# sysusers.d format https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format
%sysusers_create_compat %{SOURCE4}
# Reload our sysctl before we restart (if we can)
sysctl --system &> $output; true
@ -971,8 +920,6 @@ exit 0
%{_mandir}/man1/ldclt.1.gz
%{_bindir}/logconv.pl
%{_mandir}/man1/logconv.pl.1.gz
%{_bindir}/logconv.py
%{_mandir}/man1/logconv.py.1.gz
%{_bindir}/pwdhash
%{_mandir}/man1/pwdhash.1.gz
%{_sbindir}/ns-slapd
@ -1007,9 +954,6 @@ exit 0
%exclude %{_libdir}/%{pkgname}/lib/libjemalloc_pic.a
%exclude %{_libdir}/%{pkgname}/lib/pkgconfig
%endif
%if %{with libbdb_ro}
%exclude %{_libdir}/%{pkgname}/librobdb.so
%endif
%files devel
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.devel
@ -1049,24 +993,18 @@ exit 0
%{_libdir}/%{pkgname}/plugins/libback-bdb.so
%endif
%files -n python%{python3_pkgversion}-lib389 -f %{pyproject_files}
%doc src/lib389/README.md
%license LICENSE LICENSE.GPLv3+
# Binaries
%{_bindir}/dsconf
%{_bindir}/dscreate
%{_bindir}/dsctl
%{_bindir}/dsidm
%{_bindir}/openldap_to_ds
%{_libexecdir}/%{pkgname}/dscontainer
# Man pages
%files -n python%{python3_pkgversion}-lib389
%doc LICENSE LICENSE.GPLv3+
%{python3_sitelib}/lib389*
%{_sbindir}/dsconf
%{_mandir}/man8/dsconf.8.gz
%{_sbindir}/dscreate
%{_mandir}/man8/dscreate.8.gz
%{_sbindir}/dsctl
%{_mandir}/man8/dsctl.8.gz
%{_sbindir}/dsidm
%{_mandir}/man8/dsidm.8.gz
%{_mandir}/man8/openldap_to_ds.8.gz
%exclude %{_mandir}/man1
# Bash completions for scripts provided by python3-lib389
%{_libexecdir}/%{pkgname}/dscontainer
%{bash_completions_dir}/dsctl
%{bash_completions_dir}/dsconf
%{bash_completions_dir}/dscreate
@ -1078,16 +1016,5 @@ exit 0
%doc README.md
%endif
%if %{with libbdb_ro}
%files robdb-libs
%license COPYING.librobdb COPYING.RPM
%doc %{_defaultdocdir}/%{name}-robdb-libs/README.md
%{_libdir}/%{pkgname}/librobdb.so
%{_licensedir}/%{name}-robdb-libs/COPYING
%{_licensedir}/%{name}/COPYING.RPM
%{_licensedir}/%{name}/COPYING.librobdb
%endif
%changelog
%autochangelog

View file

@ -1,41 +0,0 @@
#commit 3de0c24859f4413bf03448249078169bb50bda0f
#Author: divanorama <divanorama@gmail.com>
#Date: Thu Sep 29 23:35:59 2022 +0200
#
# Disable builtin malloc in tests
#
# With `--with-jemalloc-prefix=` and without `-fno-builtin` or `-O1` both clang and gcc may optimize out `malloc` calls
# whose result is unused. Comparing result to NULL also doesn't necessarily count as being used.
#
# This won't be a problem in most client programs as this only concerns really unused pointers, but in
# tests it's important to actually execute allocations.
# `-fno-builtin` should disable this optimization for both gcc and clang, and applying it only to tests code shouldn't hopefully be an issue.
# Another alternative is to force "use" of result but that'd require more changes and may miss some other optimization-related issues.
#
# This should resolve https://github.com/jemalloc/jemalloc/issues/2091
#
#diff --git a/Makefile.in b/Makefile.in
#index 6809fb29..a964f07e 100644
#--- a/Makefile.in
#+++ b/Makefile.in
#@@ -458,6 +458,8 @@ $(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
# $(TESTS_CPP_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.cpp
# $(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
# $(TESTS_CPP_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
#+$(TESTS_OBJS): CFLAGS += -fno-builtin
#+$(TESTS_CPP_OBJS): CPPFLAGS += -fno-builtin
# ifneq ($(IMPORTLIB),$(SO))
# $(CPP_OBJS) $(C_SYM_OBJS) $(C_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT
# endif
diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp
index fffd6aee..5a682991 100644
--- a/src/jemalloc_cpp.cpp
+++ b/src/jemalloc_cpp.cpp
@@ -93,7 +93,7 @@ handleOOM(std::size_t size, bool nothrow) {
}
if (ptr == nullptr && !nothrow)
- std::__throw_bad_alloc();
+ throw std::bad_alloc();
return ptr;
}

View file

@ -1,3 +1,3 @@
SHA512 (jemalloc-5.3.0.tar.bz2) = 22907bb052096e2caffb6e4e23548aecc5cc9283dce476896a2b1127eee64170e3562fa2e7db9571298814a7a2c7df6e8d1fbe152bd3f3b0c1abec22a2de34b1
SHA512 (389-ds-base-3.1.1.tar.bz2) = c6aa0aba9779bd4ed6768f140d255474bc5e02455e37db6e8273740e9be81ac90bcab4ea97e117af573cb1d3f56ddd59d063b7715d99261ebf2d497c2801bc41
SHA512 (libdb-5.3.28-59.tar.bz2) = 731a434fa2e6487ebb05c458b0437456eb9f7991284beb08cb3e21931e23bdeddddbc95bfabe3a2f9f029fe69cd33a2d4f0f5ce6a9811e9c3b940cb6fde4bf79
SHA512 (389-ds-base-3.2.0.tar.bz2) = 9ff6aa56b30863c619f4f324344dca72cc883236bfe8d94520e8469d9e306f54b373ee2504eda18dcb0ecda33f915a3e64a6f3cdaa93a69b74d901caa48545e1