import UBI apr-util-1.6.3-23.el10_1

This commit is contained in:
eabdullin 2026-02-04 19:25:01 +00:00
parent dbbfc3b7d6
commit fa5b9b91fd
2 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,60 @@
From 51ca8797b171ec04de7dc26b056e4239c2993381 Mon Sep 17 00:00:00 2001
From: Jean-Frederic Clere <jfclere@gmail.com>
Date: Thu, 25 Sep 2025 09:06:35 +0200
Subject: [PATCH] backport r1928729: Arrange lmdb logic: htdbm -x wasn't
working because the database was MDB_RDONLY. Additionally add comments in the
code.
---
dbm/apr_dbm_lmdb.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dbm/apr_dbm_lmdb.c b/dbm/apr_dbm_lmdb.c
index 3702dedb..f3ea1f45 100644
--- a/dbm/apr_dbm_lmdb.c
+++ b/dbm/apr_dbm_lmdb.c
@@ -41,8 +41,6 @@ typedef struct {
#define APR_DBM_LMDBMODE_RO MDB_RDONLY
#define APR_DBM_LMDBMODE_RWCREATE MDB_CREATE
-#define APR_DBM_LMDBMODE_RW (MDB_RDONLY + MDB_CREATE + 1)
-#define APR_DBM_LMDBMODE_RWTRUNC (APR_DBM_LMDBMODE_RW + 1)
/* --------------------------------------------------------------------------
**
@@ -98,13 +96,13 @@ static apr_status_t vt_lmdb_open(apr_dbm_t **pdb, const char *pathname,
dbmode = APR_DBM_LMDBMODE_RO;
break;
case APR_DBM_READWRITE:
- dbmode = APR_DBM_LMDBMODE_RW;
+ dbmode = 0;
break;
case APR_DBM_RWCREATE:
dbi_open_flags = APR_DBM_LMDBMODE_RWCREATE;
break;
case APR_DBM_RWTRUNC:
- truncate = APR_DBM_LMDBMODE_RWTRUNC;
+ truncate = 1;
break;
default:
return APR_EINVAL;
@@ -124,14 +122,17 @@ static apr_status_t vt_lmdb_open(apr_dbm_t **pdb, const char *pathname,
}
if (dberr == 0) {
+ /* we pass MDB_RDONLY and the default */
dberr = mdb_env_open(file.env, pathname, dbmode | DEFAULT_ENV_FLAGS, apr_posix_perms2mode(perm));
}
if (dberr == 0) {
+ /* we pass MDB_RDONLY */
dberr = mdb_txn_begin(file.env, NULL, dbmode, &file.txn);
}
if (dberr == 0) {
+ /* we pass the DB_CREATE */
dberr = mdb_dbi_open(file.txn, NULL, dbi_open_flags, &file.dbi);
/* if mode == APR_DBM_RWTRUNC, drop database */

View File

@ -37,7 +37,7 @@
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: 1.6.3
Release: 21%{?dist}
Release: 23%{?dist}
# Apache-2.0: everything
# RSA-MD: https://gitlab.com/fedora/legal/fedora-legal-docs/-/merge_requests/187
# include\apr_md5.h, passwd\apr_md5.c, crypto\apr_md4.c, include\apr_md4.h
@ -57,6 +57,7 @@ Patch6: apr-util-1.6.3-r1908584.patch
Patch7: apr-util-1.6.3-r1908585.patch
Patch8: apr-util-1.6.3-r1908586.patch
Patch9: apr-util-1.6.3-drop-engine-headers.patch
Patch10: apr-util-1.6.3-r1928729.patch
BuildRequires: gcc
BuildRequires: autoconf, apr-devel >= 1.3.0
BuildRequires: %{dbdep}, expat-devel, libuuid-devel
@ -283,6 +284,9 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}/apr-util-%{apuver}
%{_datadir}/aclocal/*.m4
%changelog
* Fri Dec 05 2025 Luboš Uhliarik <luhliari@redhat.com> - 1.6.3-23
- Resolves: RHEL-117419 - apr-util lmdb prevent htdbm to remove user
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.6.3-21
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018