public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/389-ds-base] f43: Resolves: Issue 7267 - MDB_BAD_VALSIZE error when updating index
@ 2026-06-04 7:55 Viktor Ashirov
0 siblings, 0 replies; only message in thread
From: Viktor Ashirov @ 2026-06-04 7:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/389-ds-base
Branch : f43
Commit : c87582440885d29d5b86375c21146d1b9627d3f4
Author : Viktor Ashirov <vashirov@redhat.com>
Date : 2026-06-04T09:54:59+02:00
Stats : +776/-69 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/389-ds-base/c/c87582440885d29d5b86375c21146d1b9627d3f4?branch=f43
Log:
Resolves: Issue 7267 - MDB_BAD_VALSIZE error when updating index
---
diff --git a/.gitignore b/.gitignore
index 18ea466..29638b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
/389-ds-base-*.tar.bz2
/jemalloc-*.tar.bz2
/libdb-5.3.28-59.tar.bz2
+/vendor-3.1.4-1.tar.gz
+/Cargo-3.1.4-1.lock
+/cockpit_dist-3.1.4-1.tar.bz2
diff --git a/0028-Issue-7267-MDB_BAD_VALSIZE-error-when-updating-index.patch b/0028-Issue-7267-MDB_BAD_VALSIZE-error-when-updating-index.patch
new file mode 100644
index 0000000..d1e9ec6
--- /dev/null
+++ b/0028-Issue-7267-MDB_BAD_VALSIZE-error-when-updating-index.patch
@@ -0,0 +1,681 @@
+From 4809c6cf43ac9709568e2637e127f5a76c9d845e Mon Sep 17 00:00:00 2001
+From: progier389 <progier@redhat.com>
+Date: Wed, 25 Feb 2026 18:00:24 +0100
+Subject: [PATCH] Issue 7267 - MDB_BAD_VALSIZE error when updating index
+ (#7268)
+
+* Issue 7267 - MDB_BAD_VALSIZE error when updating index
+* Improve import log when writer fails
+* Fix Sourcery AI comments
+* Fix INDEX_KEY_LENGTH typo
+
+Problem with the key prefix handling when key is too long and must be hashed.
+The issue is that the # that is prepended is not reset when iterating over the valueset values (Ending up with very long prefix)
+
+Also refactored the code to avoid duplicate the code that prepare the key from the attribute value (used when updating the index or retrieving a value from an index)
+
+Issue: #7267
+
+Reviewed by: @tbordaz , @vashirov (Thanks!)
+
+Co-authored-by: Viktor Ashirov <vashirov@redhat.com>
+
+---------
+
+Co-authored-by: Viktor Ashirov <vashirov@redhat.com>
+---
+ .../tests/suites/indexes/regression_test.py | 85 +++++++++
+ ldap/servers/slapd/back-ldbm/attrcrypt.h | 2 +-
+ ldap/servers/slapd/back-ldbm/back-ldbm.h | 2 +
+ .../slapd/back-ldbm/db-bdb/bdb_import.c | 39 +----
+ .../back-ldbm/db-mdb/mdb_import_threads.c | 46 ++++-
+ ldap/servers/slapd/back-ldbm/index.c | 161 +++++++-----------
+ ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c | 13 +-
+ .../servers/slapd/back-ldbm/proto-back-ldbm.h | 2 +-
+ ldap/servers/slapd/log.c | 43 +++++
+ ldap/servers/slapd/slapi-private.h | 2 +
+ 10 files changed, 251 insertions(+), 144 deletions(-)
+
+diff --git a/dirsrvtests/tests/suites/indexes/regression_test.py b/dirsrvtests/tests/suites/indexes/regression_test.py
+index 71670de87..39f63e349 100644
+--- a/dirsrvtests/tests/suites/indexes/regression_test.py
++++ b/dirsrvtests/tests/suites/indexes/regression_test.py
+@@ -900,6 +900,91 @@ def test_concurrent_modifications_during_indexing(topo, homeDirectory_index_clea
+ user.delete()
+
+
++def test_idl_range_limit(topo, add_some_entries):
++ """Test nsslapd-rangelookthroughlimit and AND shortcut
++
++ :id: 746a5af2-d755-11f0-8b62-c85309d5c3e3
++ :setup: Standalone Instance with some entries
++ :steps:
++ 1. Set nsslapd-rangelookthroughlimit
++ 2. Open a new connection and bound it as an user
++ 3. Perform Range search that hit nsslapd-rangelookthroughlimit and AND shortcut
++ :expectedresults:
++ 1. Success
++ 2. Success
++ 3. Success
++ """
++
++ inst = topo.standalone
++ added_entries = add_some_entries
++
++ dbconfig = LDBMConfig(inst)
++ dbconfig.set('nsslapd-rangelookthroughlimit', "50")
++
++ conn = added_entries[0].bind(PW_DM)
++
++ entries = conn.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, "(&(objectclass=nsOrgPerson)(sn=foo)(uid>=a))")
++ assert len(entries) == 3
++
++
++def test_large_multivalued_sn_attribute(topo):
++ """Test adding a user entry with 512 values for sn attribute, each 512 bytes
++
++ :id: 8f2a9b3c-e8d7-11ef-9a5f-482ae39447e5
++ :setup: Standalone Instance
++ :steps:
++ 1. Create a user with 512 sn values, each 512 bytes long
++ 2. Verify the user was created successfully
++ 3. Search for the user and verify all sn values are present
++ 4. Clean up the user entry
++ :expectedresults:
++ 1. User is created successfully
++ 2. User entry exists
++ 3. All 512 sn values are present and have correct length
++ 4. User is deleted successfully
++ """
++
++ inst = topo.standalone
++ users = UserAccounts(inst, DEFAULT_SUFFIX)
++
++ log.info("Creating user with 512 sn values, each 512 bytes")
++
++ # Generate 512 unique sn values, each 512 bytes long
++ # Use a pattern that makes each value unique but predictable
++ sn_values = []
++ for i in range(512):
++ # Create a 512-byte value with unique identifier at the start
++ value = f'sn_value_{i:04d}_' + 'x' * (512 - len(f'sn_value_{i:04d}_'))
++ sn_values.append(value)
++
++ # Create the user with first sn value
++ user_name = 'test_user_large_sn'
++ user = users.create(properties={
++ 'uid': user_name,
++ 'cn': user_name,
++ 'sn': sn_values,
++ 'uidNumber': '99999',
++ 'gidNumber': '99999',
++ 'homeDirectory': f'/home/{user_name}'
++ })
++
++ # Verify the entry was created and has all sn values
++ log.info("Verifying all sn values are present")
++ sn_attr_values = user.get_attr_vals_utf8('sn')
++
++ assert len(sn_attr_values) == 512, f"Expected 512 sn values, got {len(sn_attr_values)}"
++
++ # Verify each value has the correct length
++ for idx, value in enumerate(sn_attr_values):
++ assert len(value) == 512, f"sn value {idx} has length {len(value)}, expected 512"
++
++ log.info("Successfully created and verified user with 512 sn values of 512 bytes each")
++
++ # Clean up
++ user.delete()
++ log.info("User entry deleted successfully")
++
++
+ if __name__ == "__main__":
+ # Run isolated
+ # -s for DEBUG mode
+diff --git a/ldap/servers/slapd/back-ldbm/attrcrypt.h b/ldap/servers/slapd/back-ldbm/attrcrypt.h
+index d653ba951..dcbea80fe 100644
+--- a/ldap/servers/slapd/back-ldbm/attrcrypt.h
++++ b/ldap/servers/slapd/back-ldbm/attrcrypt.h
+@@ -10,7 +10,7 @@
+ #include <config.h>
+ #endif
+
+-/* Private tructures and #defines used in the attribute encryption code. */
++/* Private structures and #defines used in the attribute encryption code. */
+
+ #ifndef _ATTRCRYPT_H_
+ #define _ATTRCRYPT_H_
+diff --git a/ldap/servers/slapd/back-ldbm/back-ldbm.h b/ldap/servers/slapd/back-ldbm/back-ldbm.h
+index e23e7ff43..92aa1ddbb 100644
+--- a/ldap/servers/slapd/back-ldbm/back-ldbm.h
++++ b/ldap/servers/slapd/back-ldbm/back-ldbm.h
+@@ -104,6 +104,8 @@ typedef unsigned short u_int16_t;
+ */
+ #define BE_CHANGELOG_FILE "replication_changelog"
+
++#define INDEX_KEY_LENGTH(lenval,lenprefix) (lenval+lenprefix+2)
++
+ #define BDB_IMPL "bdb"
+ #define BDB_BACKEND "libback-ldbm" /* This backend plugin */
+ #define BDB_NEWIDL "newidl" /* new idl format */
+diff --git a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c
+index a6cb10aec..489433801 100644
+--- a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c
++++ b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import.c
+@@ -75,9 +75,9 @@ static IDList *bdb_idl_union_allids(backend *be, struct attrinfo *ai, IDList *a,
+ #define DEBUG_SUBCOUNT_MSG(msg, ...) { debug_subcount(__FUNCTION__, __LINE__, (msg), __VA_ARGS__); }
+ #define DUMP_SUBCOUNT_KEY(msg, key, ret) { debug_subcount(__FUNCTION__, __LINE__, "ret=%d size=%u ulen=%u doff=%u dlen=%u", \
+ ret, (key).size, (key).ulen, (key).doff, (key).dlen); \
+- if (ret == 0) hexadump(msg, (key).data, 0, (key).size); \
++ if (ret == 0) slapi_log_hexadump(SLAPI_LOG_INFO, msg, (key).data, (key).size); \
+ else if (ret == DB_BUFFER_SMALL) \
+- hexadump(msg, (key).data, 0, (key).ulen); }
++ slapi_log_hexadump(SLAPI_LOG_INFO, msg, (key).data, (key).ulen); }
+
+ static void
+ debug_subcount(const char *funcname, int line, char *msg, ...)
+@@ -90,41 +90,6 @@ debug_subcount(const char *funcname, int line, char *msg, ...)
+ slapi_log_err(SLAPI_LOG_INFO, (char*)funcname, "DEBUG SUBCOUNT [%d] %s\n", line, buff);
+ }
+
+-/*
+- * Dump a memory buffer in hexa and ascii in error log
+- *
+- * addr - The memory buffer address.
+- * len - The memory buffer lenght.
+- */
+-static void
+-hexadump(char *msg, const void *addr, size_t offset, size_t len)
+-{
+-#define HEXADUMP_TAB 4
+-/* 4 characters per bytes: 2 hexa digits, 1 space and the ascii */
+-#define HEXADUMP_BUF_SIZE (4*16+HEXADUMP_TAB)
+- char hexdigit[] = "0123456789ABCDEF";
+-
+- const unsigned char *pt = addr;
+- char buff[HEXADUMP_BUF_SIZE+1];
+- memset (buff, ' ', HEXADUMP_BUF_SIZE);
+- buff[HEXADUMP_BUF_SIZE] = '\0';
+- while (len > 0) {
+- int dpl;
+- for (dpl = 0; dpl < 16 && len>0; dpl++, len--) {
+- buff[3*dpl] = hexdigit[((*pt) >> 4) & 0xf];
+- buff[3*dpl+1] = hexdigit[(*pt) & 0xf];
+- buff[3*16+HEXADUMP_TAB+dpl] = (*pt>=0x20 && *pt<0x7f) ? *pt : '.';
+- pt++;
+- }
+- for (;dpl < 16; dpl++) {
+- buff[3*dpl] = ' ';
+- buff[3*dpl+1] = ' ';
+- buff[3*16+HEXADUMP_TAB+dpl] = ' ';
+- }
+- slapi_log_err(SLAPI_LOG_INFO, msg, "[0x%08lx] %s\n", offset, buff);
+- offset += 16;
+- }
+-}
+ #else
+ #define DEBUG_SUBCOUNT_MSG(msg, ...)
+ #define DUMP_SUBCOUNT_KEY(msg, key, ret)
+diff --git a/ldap/servers/slapd/back-ldbm/db-mdb/mdb_import_threads.c b/ldap/servers/slapd/back-ldbm/db-mdb/mdb_import_threads.c
+index 2270abd69..bfb902c02 100644
+--- a/ldap/servers/slapd/back-ldbm/db-mdb/mdb_import_threads.c
++++ b/ldap/servers/slapd/back-ldbm/db-mdb/mdb_import_threads.c
+@@ -1122,6 +1122,21 @@ dbmdb_import_entry_info_by_backentry(mdb_privdb_t *db, BulkQueueData_t *bqdata,
+ return dnrc;
+ }
+
++/* Log wqelmt details */
++void
++log_wqelmt(int loglvl, char *fname, WorkerQueueData_t *wqelmt)
++{
++ if (wqelmt->dn) {
++ slapi_log_err(loglvl, fname, "log_wqelmt: dn=%s\n", wqelmt->dn);
++ }
++ if (wqelmt->filename && wqelmt->lineno) {
++ slapi_log_err(loglvl, fname, "log_wqelmt: ldif=%s[%d]\n", wqelmt->filename, wqelmt->lineno);
++ }
++ if (wqelmt->data) {
++ size_t len = wqelmt->datalen ? wqelmt->datalen : strlen(wqelmt->data);
++ slapi_log_hexadump(loglvl, "log_wqelmt:data", wqelmt->data, len);
++ }
++}
+
+ /* producer thread for ldif import case:
+ * read through the given file list, parsing entries (str2entry), assigning
+@@ -1254,6 +1269,7 @@ dbmdb_import_producer(void *param)
+ import_log_notice(job, SLAPI_LOG_ERR, "dbmdb_import_producer",
+ "ns_slapd software error: unexpected dbmdb_import_entry_info return code: %d.",
+ wqelmt.dnrc);
++ log_wqelmt(SLAPI_LOG_ERR, "dbmdb_import_producer", &wqelmt);
+ abort();
+ case DNRC_OK:
+ case DNRC_SUFFIX:
+@@ -1757,6 +1773,7 @@ dbmdb_index_producer(void *param)
+ import_log_notice(job, SLAPI_LOG_ERR, "dbmdb_index_producer",
+ "ns_slapd software error: unexpected dbmdb_import_entry_info return code: %d.",
+ tmpslot.dnrc);
++ log_wqelmt(SLAPI_LOG_ERR, "dbmdb_index_producer", &tmpslot);
+ abort();
+ case DNRC_OK:
+ case DNRC_SUFFIX:
+@@ -3934,10 +3951,24 @@ dbmdb_import_writer(void*param)
+ if (!txn) {
+ MDB_STAT_STEP(stats, MDB_STAT_TXNSTART);
+ rc = TXN_BEGIN(ctx->ctx->env, NULL, 0, &txn);
++ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
++ "Failed to begin a txn. Error is 0x%x: %s.\n",
++ rc, mdb_strerror(rc));
++ }
+ }
+ if (!rc) {
+ MDB_STAT_STEP(stats, MDB_STAT_WRITE);
+ rc = MDB_PUT(txn, slot->dbi->dbi, &slot->key, &slot->data, 0);
++ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
++ "Failed to write record in dbi %s. Error is 0x%x: %s.\n",
++ slot->dbi->dbname, rc, mdb_strerror(rc));
++ slapi_log_hexadump(SLAPI_LOG_ERR, "dbmdb_import_writer:key",
++ slot->key.mv_data, slot->key.mv_size);
++ slapi_log_hexadump(SLAPI_LOG_ERR, "dbmdb_import_writer:data",
++ slot->data.mv_data, slot->data.mv_size);
++ }
+ }
+ MDB_STAT_STEP(stats, MDB_STAT_RUN);
+ nextslot = slot->next;
+@@ -3951,6 +3982,9 @@ dbmdb_import_writer(void*param)
+ rc = TXN_COMMIT(txn);
+ MDB_STAT_STEP(stats, MDB_STAT_RUN);
+ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
++ "Failed to commit the txn. Error is 0x%x: %s.\n",
++ rc, mdb_strerror(rc));
+ break;
+ }
+ count = 0;
+@@ -3963,6 +3997,10 @@ dbmdb_import_writer(void*param)
+ MDB_STAT_STEP(stats, MDB_STAT_RUN);
+ if (!rc) {
+ txn = NULL;
++ } else {
++ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
++ "Failed to commit the txn. Error is 0x%x: %s.\n",
++ rc, mdb_strerror(rc));
+ }
+ }
+ if (txn) {
+@@ -3975,13 +4013,17 @@ dbmdb_import_writer(void*param)
+ if (!rc) {
+ /* Ensure that all data are written on disk */
+ rc = mdb_env_sync(ctx->ctx->env, 1);
++ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
++ "mdb_env_sync failed. Error is 0x%x: %s.\n",
++ rc, mdb_strerror(rc));
++ }
+ }
+ MDB_STAT_END(stats);
+
+ if (rc) {
+ slapi_log_err(SLAPI_LOG_ERR, "dbmdb_import_writer",
+- "Failed to write in the database. Error is 0x%x: %s.\n",
+- rc, mdb_strerror(rc));
++ "Aborting import after failure.\n");
+ thread_abort(info);
+ } else {
+ char buf[200];
+diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
+index a5004be19..c108bce3c 100644
+--- a/ldap/servers/slapd/back-ldbm/index.c
++++ b/ldap/servers/slapd/back-ldbm/index.c
+@@ -881,6 +881,67 @@ index_read(
+ return index_read_ext(be, (char *)type, indextype, val, txn, err, NULL);
+ }
+
++/* Prepare an index key (hashed if too long, encrypted if needed from attribute value */
++int
++prepare_key(backend *be, struct attrinfo *a, char **buf, size_t *buflen,
++ int flags, const char *prefix, const struct berval *bvp, dbi_val_t *key)
++{
++ /* Key format is [Hash?] [prefix] [val] [\0] */
++ struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private;
++ size_t plen = strlen(prefix);
++ struct berval *hashed_bvp = NULL;
++ struct berval *encrypted_bvp = NULL;
++ int rc = 0;
++
++ /* Hash large index key if necessary */
++ if (INDEX_KEY_LENGTH(bvp->bv_len,plen) >= li->li_max_key_len) {
++ rc = attrcrypt_hash_large_index_key(be, prefix, a, bvp, &hashed_bvp);
++ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "index_read_ext_allids",
++ "Failed to hash large index key for %s\n", a->ai_type);
++ return rc;
++ } else {
++ bvp = hashed_bvp;
++ }
++ }
++
++ /* Encrypt the index key if necessary */
++ if (rc == 0 && a->ai_attrcrypt && (0 == (flags & BE_INDEX_DONT_ENCRYPT))) {
++ rc = attrcrypt_encrypt_index_key(be, a, bvp, &encrypted_bvp);
++ if (rc) {
++ slapi_log_err(SLAPI_LOG_ERR, "addordel_values_sv",
++ "Failed to encrypt index key for %s\n", a->ai_type);
++ } else {
++ bvp = encrypted_bvp;
++ }
++ }
++ if (hashed_bvp) {
++ prefix = slapi_ch_smprintf("%c%s",HASH_PREFIX, prefix);
++ plen++;
++ }
++ if (buf && buflen) {
++ if (plen+bvp->bv_len+1 > *buflen) {
++ *buflen = plen+bvp->bv_len+1;
++ *buf = slapi_ch_realloc(*buf, *buflen);
++ }
++ dblayer_value_concat(be, key, *buf, *buflen, prefix, plen, bvp->bv_val, bvp->bv_len, "", 1);
++ } else {
++ dblayer_value_concat(be, key, NULL, 0, prefix, plen, bvp->bv_val, bvp->bv_len, "", 1);
++ }
++
++ if (hashed_bvp) {
++ ber_bvfree(hashed_bvp);
++ hashed_bvp = NULL;
++ slapi_ch_free_string((char**)&prefix);
++ }
++ if (encrypted_bvp) {
++ ber_bvfree(encrypted_bvp);
++ encrypted_bvp = NULL;
++ }
++ return rc;
++}
++
++
+ /*
+ * Extended version of index_read.
+ * The unindexed flag can be used to distinguish between a
+@@ -917,7 +978,6 @@ index_read_ext_allids(
+ struct berval *hashed_val = NULL;
+ int is_and = 0;
+ unsigned int ai_flags = 0;
+- struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private;
+
+ *err = 0;
+
+@@ -1028,36 +1088,7 @@ index_read_ext_allids(
+ }
+
+ if (val != NULL) {
+- size_t vlen;
+- int ret = 0;
+-
+- /* If necessary, hash this index key */
+- if (val->bv_len >= li->li_max_key_len) {
+- ret = attrcrypt_hash_large_index_key(be, &prefix, ai, val, &hashed_val);
+- if (ret) {
+- slapi_log_err(SLAPI_LOG_ERR, "index_read_ext_allids",
+- "Failed to hash large index key for %s\n", basetype);
+- *err = DBI_RC_OTHER;
+- index_free_prefix(prefix);
+- slapi_ch_free_string(&basetmp);
+- return (NULL);
+- }
+- if (hashed_val) {
+- val = hashed_val;
+- }
+- }
+- /* If necessary, encrypt this index key */
+- ret = attrcrypt_encrypt_index_key(be, ai, val, &encrypted_val);
+- if (ret) {
+- slapi_log_err(SLAPI_LOG_ERR, "index_read_ext_allids",
+- "Failed to encrypt index key for %s\n", basetype);
+- }
+- if (encrypted_val) {
+- val = encrypted_val;
+- }
+- vlen = val->bv_len;
+- dblayer_value_concat(be, &key, buf, sizeof(buf),
+- prefix, strlen(prefix), val->bv_val, vlen, "", 1);
++ (void) prepare_key(be, ai, NULL, 0, 0, prefix, val, &key);
+ } else {
+ dblayer_value_concat(be, &key, buf, sizeof(buf), prefix, strlen(prefix),
+ "", 1, NULL, 0);
+@@ -1824,6 +1855,7 @@ index_range_read(
+ return index_range_read_ext(pb, be, type, indextype, operator, val, nextval, range, txn, err, 0);
+ }
+
++
+ static int
+ addordel_values_sv(
+ backend *be,
+@@ -1842,15 +1874,10 @@ addordel_values_sv(
+ int i = 0;
+ dbi_val_t key = {0};
+ dbi_txn_t *db_txn = NULL;
+- size_t plen, vlen, len;
+ char *tmpbuf = NULL;
+ size_t tmpbuflen = 0;
+- char *realbuf;
+ char *prefix = NULL;
+ const struct berval *bvp;
+- struct berval *hashed_bvp = NULL;
+- struct berval *encrypted_bvp = NULL;
+- struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private;
+ char *index_id = get_index_name(be, db, a);
+
+ slapi_log_err(SLAPI_LOG_TRACE, "addordel_values_sv", "%s_values\n",
+@@ -1889,66 +1916,14 @@ addordel_values_sv(
+ return (rc);
+ }
+
+- plen = strlen(prefix);
+ for (i = 0; vals[i] != NULL; i++) {
+ bvp = slapi_value_get_berval(vals[i]);
+
+- /* Hash large index key if necessary */
+- if (bvp->bv_len >= li->li_max_key_len) {
+- rc = attrcrypt_hash_large_index_key(be, &prefix, a, bvp, &hashed_bvp);
+- if (rc) {
+- slapi_log_err(SLAPI_LOG_ERR, "index_read_ext_allids",
+- "Failed to hash large index key for %s\n", a->ai_type);
+- break;
+- } else {
+- bvp = hashed_bvp;
+- plen = strlen(prefix);
+- }
+- }
+- /* Encrypt the index key if necessary */
+- {
+- if (a->ai_attrcrypt && (0 == (flags & BE_INDEX_DONT_ENCRYPT))) {
+- rc = attrcrypt_encrypt_index_key(be, a, bvp, &encrypted_bvp);
+- if (rc) {
+- slapi_log_err(SLAPI_LOG_ERR, "addordel_values_sv",
+- "Failed to encrypt index key for %s\n", a->ai_type);
+- } else {
+- bvp = encrypted_bvp;
+- }
+- }
++ rc = prepare_key(be, a, &tmpbuf, &tmpbuflen, flags, prefix, bvp, &key);
++ if (rc) {
++ break;
+ }
+
+- vlen = bvp->bv_len;
+- len = plen + vlen;
+-
+- if (len < tmpbuflen) {
+- realbuf = tmpbuf;
+- } else {
+- tmpbuf = slapi_ch_realloc(tmpbuf, len + 1);
+- tmpbuflen = len + 1;
+- realbuf = tmpbuf;
+- }
+-
+- assert(realbuf); /* For coverity */
+- memcpy(realbuf, prefix, plen);
+- memcpy(realbuf + plen, bvp->bv_val, vlen);
+- realbuf[len] = '\0';
+- /* Free the encrypted berval if necessary */
+- if (hashed_bvp) {
+- ber_bvfree(hashed_bvp);
+- hashed_bvp = NULL;
+- }
+- if (encrypted_bvp) {
+- ber_bvfree(encrypted_bvp);
+- encrypted_bvp = NULL;
+- }
+- /* should be okay to use USERMEM here because we know what
+- * the key is and it should never return a different value
+- * than the one we pass in.
+- */
+- dblayer_value_set_buffer(be, &key, realbuf, plen + vlen + 1);
+- key.ulen = tmpbuflen;
+-
+ if (slapi_is_loglevel_set(LDAP_DEBUG_TRACE)) {
+ char encbuf[BUFSIZ];
+
+@@ -1981,10 +1956,6 @@ addordel_values_sv(
+ ldbm_nasty(NASTY_MSG("addordel_values_sv"), index_id, 1130, rc);
+ break;
+ }
+- if (NULL != key.dptr && realbuf != key.dptr) { /* realloc'ed */
+- tmpbuf = key.dptr;
+- tmpbuflen = key.size;
+- }
+ }
+ index_free_prefix(prefix);
+ if (tmpbuf != NULL) {
+diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+index 7bb57ca66..7cf30053c 100644
+--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
++++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+@@ -1069,15 +1069,15 @@ attrcrypt_decrypt_index_key(backend *be,
+ * : NULL - no hash or failure
+ */
+ int
+-attrcrypt_hash_large_index_key(backend *be, char **prefix, struct attrinfo *ai, const struct berval *in, struct berval **out)
++attrcrypt_hash_large_index_key(backend *be, const char *prefix, struct attrinfo *ai, const struct berval *in, struct berval **out)
+ {
+ int ret = 0;
+ struct berval *out_berval = NULL;
+ struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private;
+- char *new_prefix;
++ size_t final_key_len = INDEX_KEY_LENGTH(in->bv_len, strlen(prefix));
+
+ /* If the index key is too long (i.e mdb case) we must hash it */
+- if (in->bv_len >= li->li_max_key_len) {
++ if (final_key_len >= li->li_max_key_len) {
+ PK11Context *c = PK11_CreateDigestContext(SEC_OID_MD5);
+ if (c != NULL) {
+ unsigned char hash[32];
+@@ -1091,16 +1091,13 @@ attrcrypt_hash_large_index_key(backend *be, char **prefix, struct attrinfo *ai,
+ return ENOMEM;
+ }
+ slapi_log_err(SLAPI_LOG_TRACE, "attrcrypt_hash_large_index_key",
+- "Key lenght (%lu) >= max key lenght (%lu) so key must be hashed\n", in->bv_len, li->li_max_key_len);
++ "Key lenght (%lu) >= max key lenght (%lu) so key must be hashed\n", final_key_len, li->li_max_key_len);
+ slapi_be_set_flag(be, SLAPI_BE_FLAG_DONT_BYPASS_FILTERTEST);
+ PK11_DigestBegin(c);
+ /* Compute hash for the key without the prefix */
+ PK11_DigestOp(c, (unsigned char *)in->bv_val, in->bv_len);
+ PK11_DigestFinal(c, hash, &hashLen, sizeof hash);
+- /* Add HASH_PREFIX before the prefix */
+- new_prefix = slapi_ch_smprintf("%c%s", HASH_PREFIX, *prefix);
+- index_free_prefix(*prefix);
+- *prefix = new_prefix;
++
+ /* Build the key: hash value in hexa */
+ hkey = slapi_ch_malloc(1+2*sizeof hash);
+ out_berval->bv_val = hkey;
+diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+index 30a7aa11f..c882dac7b 100644
+--- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
++++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+@@ -622,7 +622,7 @@ int attrcrypt_encrypt_entry_inplace(backend *be, const struct backentry *inout);
+ int attrcrypt_encrypt_entry(backend *be, const struct backentry *in, struct backentry **out);
+ int attrcrypt_encrypt_index_key(backend *be, struct attrinfo *ai, const struct berval *in, struct berval **out);
+ int attrcrypt_decrypt_index_key(backend *be, struct attrinfo *ai, const struct berval *in, struct berval **out);
+-int attrcrypt_hash_large_index_key(backend *be, char **prefix, struct attrinfo *ai, const struct berval *in, struct berval **out);
++int attrcrypt_hash_large_index_key(backend *be, const char *prefix, struct attrinfo *ai, const struct berval *in, struct berval **out);
+ int attrcrypt_init(ldbm_instance *li);
+ int attrcrypt_cleanup_private(ldbm_instance *li);
+
+diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
+index 80c07382a..93101494b 100644
+--- a/ldap/servers/slapd/log.c
++++ b/ldap/servers/slapd/log.c
+@@ -93,6 +93,10 @@ static int slapi_log_map[] = {
+ #define FLUSH PR_TRUE
+ #define NO_FLUSH PR_FALSE
+
++#define HEXADUMP_TAB 4
++/* 4 characters per bytes: 2 hexa digits, 1 space and the ascii */
++#define HEXADUMP_BUF_SIZE (4*16+HEXADUMP_TAB)
++
+ /**************************************************************************
+ * PROTOTYPES
+ *************************************************************************/
+@@ -3133,6 +3137,45 @@ slapi_log_backtrace(int loglevel)
+ }
+ }
+
++/*
++ * Dump a memory buffer in hexa and ascii in error log
++ *
++ * addr - The memory buffer address.
++ * len - The memory buffer lenght.
++ */
++void
++slapi_log_hexadump(int loglevel, char *fname, const void *addr, size_t len)
++{
++ char hexdigit[] = "0123456789ABCDEF";
++ const unsigned char *pt = addr;
++ char buff[HEXADUMP_BUF_SIZE+1];
++ size_t offset = 0;
++
++ if (!slapi_is_loglevel_set(loglevel)) {
++ return;
++ }
++ memset (buff, ' ', HEXADUMP_BUF_SIZE);
++ buff[HEXADUMP_BUF_SIZE] = '\0';
++ while (len > 0) {
++ int dpl;
++ for (dpl = 0; dpl < 16 && len>0; dpl++, len--) {
++ buff[3*dpl] = hexdigit[((*pt) >> 4) & 0xf];
++ buff[3*dpl+1] = hexdigit[(*pt) & 0xf];
++ buff[3*16+HEXADUMP_TAB+dpl] = (*pt>=0x20 && *pt<0x7f) ? *pt : '.';
++ pt++;
++ }
++ for (;dpl < 16; dpl++) {
++ buff[3*dpl] = ' ';
++ buff[3*dpl+1] = ' ';
++ buff[3*16+HEXADUMP_TAB+dpl] = ' ';
++ }
++ slapi_log_err(loglevel, fname, "[0x%08lx] %s\n", offset, buff);
++ offset += 16;
++ }
++}
++
++
++
+ /******************************************************************************
+ * write in the access log
+ ******************************************************************************/
+diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h
+index 72f4cd6f0..2da37ff6e 100644
+--- a/ldap/servers/slapd/slapi-private.h
++++ b/ldap/servers/slapd/slapi-private.h
+@@ -1527,6 +1527,8 @@ void slapi_pblock_set_task_warning(Slapi_PBlock *pb, task_warning warning);
+ int slapi_exists_or_add_internal(Slapi_DN *dn, const char *filter, const char *entry, const char *modifier_name);
+
+ void slapi_log_backtrace(int loglevel);
++void slapi_log_hexadump(int loglevel, char *fname, const void *addr, size_t len);
++
+
+ /*
+ * accesslog.c
+--
+2.54.0
+
diff --git a/389-ds-base.spec b/389-ds-base.spec
index 472dd5a..c160a9b 100644
--- a/389-ds-base.spec
+++ b/389-ds-base.spec
@@ -77,106 +77,109 @@ Summary: 389 Directory Server (%{variant})
Name: 389-ds-base
Version: 3.1.4
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 WITH GPL-3.0-389-ds-base-exception AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) 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
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(anyhow)) = 1.0.102
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.5.1
Provides: bundled(crate(base64)) = 0.13.1
-Provides: bundled(crate(bitflags)) = 2.9.1
+Provides: bundled(crate(bitflags)) = 2.12.1
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.2.63
+Provides: bundled(crate(cfg-if)) = 1.0.4
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.5.10
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(errno)) = 0.3.14
+Provides: bundled(crate(fastrand)) = 2.4.1
Provides: bundled(crate(fernet)) = 0.1.4
-Provides: bundled(crate(foldhash)) = 0.1.5
+Provides: bundled(crate(find-msvc-tools)) = 0.1.9
+Provides: bundled(crate(foldhash)) = 0.2.0
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(heck)) = 0.4.1
+Provides: bundled(crate(getrandom)) = 0.4.2
+Provides: bundled(crate(hashbrown)) = 0.17.1
+Provides: bundled(crate(heck)) = 0.5.0
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(id-arena)) = 2.3.0
+Provides: bundled(crate(indexmap)) = 2.14.0
+Provides: bundled(crate(itoa)) = 1.0.18
+Provides: bundled(crate(jobserver)) = 0.1.34
+Provides: bundled(crate(leb128fmt)) = 0.1.0
+Provides: bundled(crate(libc)) = 0.2.186
+Provides: bundled(crate(linux-raw-sys)) = 0.12.1
+Provides: bundled(crate(log)) = 0.4.31
+Provides: bundled(crate(lru)) = 0.16.4
+Provides: bundled(crate(memchr)) = 2.8.1
+Provides: bundled(crate(once_cell)) = 1.21.4
+Provides: bundled(crate(openssl)) = 0.10.80
Provides: bundled(crate(openssl-macros)) = 0.1.1
-Provides: bundled(crate(openssl-sys)) = 0.9.109
+Provides: bundled(crate(openssl-sys)) = 0.9.116
Provides: bundled(crate(os_str_bytes)) = 6.6.1
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.17
+Provides: bundled(crate(pkg-config)) = 0.3.33
+Provides: bundled(crate(prettyplease)) = 0.2.37
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(proc-macro2)) = 1.0.106
+Provides: bundled(crate(quote)) = 1.0.45
+Provides: bundled(crate(r-efi)) = 6.0.0
+Provides: bundled(crate(rustix)) = 1.1.4
+Provides: bundled(crate(semver)) = 1.0.28
+Provides: bundled(crate(serde)) = 1.0.228
+Provides: bundled(crate(serde_core)) = 1.0.228
+Provides: bundled(crate(serde_derive)) = 1.0.228
+Provides: bundled(crate(serde_json)) = 1.0.150
+Provides: bundled(crate(shlex)) = 2.0.1
Provides: bundled(crate(smallvec)) = 1.15.1
Provides: bundled(crate(sptr)) = 0.3.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.117
+Provides: bundled(crate(tempfile)) = 3.27.0
Provides: bundled(crate(termcolor)) = 1.4.1
Provides: bundled(crate(textwrap)) = 0.16.2
-Provides: bundled(crate(tokio)) = 1.45.1
+Provides: bundled(crate(tokio)) = 1.52.3
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(tracing)) = 0.1.44
+Provides: bundled(crate(tracing-attributes)) = 0.1.31
+Provides: bundled(crate(tracing-core)) = 0.1.36
+Provides: bundled(crate(unicode-ident)) = 1.0.24
+Provides: bundled(crate(unicode-xid)) = 0.2.6
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(wasi)) = 0.11.1+wasi_snapshot_preview1
+Provides: bundled(crate(wasip2)) = 1.0.3+wasi_0.2.9
+Provides: bundled(crate(wasip3)) = 0.4.0+wasi_0.3.0_rc_2026_01_06
+Provides: bundled(crate(wasm-encoder)) = 0.244.0
+Provides: bundled(crate(wasm-metadata)) = 0.244.0
+Provides: bundled(crate(wasmparser)) = 0.244.0
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.11
Provides: bundled(crate(winapi-x86_64-pc-windows-gnu)) = 0.4.0
-Provides: bundled(crate(windows-sys)) = 0.59.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
-Provides: bundled(crate(windows_i686_gnu)) = 0.52.6
-Provides: bundled(crate(windows_i686_gnullvm)) = 0.52.6
-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(zeroize)) = 1.8.1
-Provides: bundled(crate(zeroize_derive)) = 1.4.2
+Provides: bundled(crate(windows-link)) = 0.2.1
+Provides: bundled(crate(windows-sys)) = 0.61.2
+Provides: bundled(crate(wit-bindgen)) = 0.57.1
+Provides: bundled(crate(wit-bindgen-core)) = 0.51.0
+Provides: bundled(crate(wit-bindgen-rust)) = 0.51.0
+Provides: bundled(crate(wit-bindgen-rust-macro)) = 0.51.0
+Provides: bundled(crate(wit-component)) = 0.244.0
+Provides: bundled(crate(wit-parser)) = 0.244.0
+Provides: bundled(crate(zeroize)) = 1.8.2
+Provides: bundled(crate(zeroize_derive)) = 1.4.3
+Provides: bundled(crate(zmij)) = 1.0.21
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
@@ -213,14 +216,14 @@ 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(acorn-jsx)) = 5.3.2
-Provides: bundled(npm(ajv)) = 6.12.6
+Provides: bundled(npm(ajv)) = 6.15.0
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(balanced-match)) = 1.0.2
-Provides: bundled(npm(brace-expansion)) = 1.1.12
+Provides: bundled(npm(brace-expansion)) = 1.1.15
Provides: bundled(npm(callsites)) = 3.1.0
Provides: bundled(npm(chalk)) = 4.1.2
Provides: bundled(npm(color-convert)) = 2.0.1
@@ -264,7 +267,7 @@ Provides: bundled(npm(file-entry-cache)) = 6.0.1
Provides: bundled(npm(file-selector)) = 2.1.0
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(flatted)) = 3.4.2
Provides: bundled(npm(focus-trap)) = 7.5.4
Provides: bundled(npm(fs.realpath)) = 1.0.0
Provides: bundled(npm(gettext-parser)) = 2.1.0
@@ -297,11 +300,11 @@ 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)) = 4.18.1
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(minimatch)) = 3.1.5
Provides: bundled(npm(ms)) = 2.1.3
Provides: bundled(npm(natural-compare)) = 1.4.0
Provides: bundled(npm(object-assign)) = 4.1.1
@@ -510,6 +513,10 @@ Source4: 389-ds-base.sysusers
Source5: https://fedorapeople.org/groups/389ds/libdb-5.3.28-59.tar.bz2
%endif
+Source6: vendor-%{version}-1.tar.gz
+Source7: Cargo-%{version}-1.lock
+Source8: cockpit_dist-%{version}-1.tar.bz2
+
Patch: 0001-Issue-7150-Compressed-access-log-rotations-skipped-a.patch
Patch: 0002-Sync-lib389-version-to-3.1.4-7161.patch
Patch: 0003-Issue-7166-db_config_set-asserts-because-of-dynamic-.patch
@@ -537,6 +544,7 @@ Patch: 0024-Issue-7223-Use-lexicographical-order-for-ancestorid-.patc
Patch: 0025-Issue-7223-Remove-integerOrderingMatch-requirement-f.patch
Patch: 0026-Security-fix-for-CVE-2025-14905.patch
Patch: 0027-Issue-7302-dblib-bdb2mdb-fails-on-F43-F43-upgrade-73.patch
+Patch: 0028-Issue-7267-MDB_BAD_VALSIZE-error-when-updating-index.patch
%description
389 Directory Server is an LDAPv3 compliant server. The base package includes
@@ -550,7 +558,7 @@ Please see http://seclists.org/oss-sec/2016/q1/363 for more information.
%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
+License: GPL-3.0-or-later WITH GPL-3.0-389-ds-base-exception AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) 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
%description robdb-libs
The %{name}-robdb-lib package contains a library derived from rpm
@@ -670,6 +678,13 @@ cd src/lib389
%prep
%autosetup -S git -p1 -n %{name}-%{version}
+%if %{defined SOURCE6}
+rm -rf vendor
+tar xzf %{SOURCE6}
+%endif
+%if %{defined SOURCE7}
+cp %{SOURCE7} src/Cargo.lock
+%endif
%if %{with bundle_jemalloc}
%setup -q -n %{name}-%{version} -T -D -b 3
@@ -679,6 +694,11 @@ cd src/lib389
%setup -q -n %{name}-%{version} -T -D -b 5
%endif
+%if %{defined SOURCE8}
+# Unpack prebuilt cockpit files
+tar xvjf %{SOURCE8} -C src/cockpit/389-console
+%endif
+
cp %{SOURCE2} README.devel
%build
diff --git a/sources b/sources
index d1563dc..b6b2faf 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,6 @@
SHA512 (jemalloc-5.3.0.tar.bz2) = 22907bb052096e2caffb6e4e23548aecc5cc9283dce476896a2b1127eee64170e3562fa2e7db9571298814a7a2c7df6e8d1fbe152bd3f3b0c1abec22a2de34b1
SHA512 (libdb-5.3.28-59.tar.bz2) = 731a434fa2e6487ebb05c458b0437456eb9f7991284beb08cb3e21931e23bdeddddbc95bfabe3a2f9f029fe69cd33a2d4f0f5ce6a9811e9c3b940cb6fde4bf79
SHA512 (389-ds-base-3.1.4.tar.bz2) = 17de77a02c848dbb8d364e7bab529726b4c32e466f47d5c2a5bba8d8b55e2a56e2b743a2efa4f820c935b39f770a621146a42443e4f171f8b14c68968155ee2c
+SHA512 (vendor-3.1.4-1.tar.gz) = 52fcb3268b863a4b8d3fe61109ab8ef231d7fc412768d8019244bc245cfface20c4531195d08d29577eaca29e87046e74083b8d33f2fb4cc0b16a6d734a854af
+SHA512 (Cargo-3.1.4-1.lock) = 949013fe4cfe30969b8411b465901514c3ea5144d329a4ea1d80244e4bd3d000db857f9b78d57a4f4f3fd240ec5b7f91ed8c39ff53a718c911ee205410bb7cc7
+SHA512 (cockpit_dist-3.1.4-1.tar.bz2) = faeaa67801f9d61f74decbc989fc05c2f6f1242879d0202482d13d5071562e529827aec78a4d9f2e19684026c5f0a2d47a4e83120b035596da2951792059ba18
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-04 7:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 7:55 [rpms/389-ds-base] f43: Resolves: Issue 7267 - MDB_BAD_VALSIZE error when updating index Viktor Ashirov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox