summaryrefslogtreecommitdiff
path: root/sys-apps/acl
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /sys-apps/acl
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'sys-apps/acl')
-rw-r--r--sys-apps/acl/Manifest1
-rw-r--r--sys-apps/acl/acl-2.3.2-r3.ebuild56
-rw-r--r--sys-apps/acl/files/acl-2.3.2-memory.patch49
-rw-r--r--sys-apps/acl/metadata.xml11
4 files changed, 117 insertions, 0 deletions
diff --git a/sys-apps/acl/Manifest b/sys-apps/acl/Manifest
new file mode 100644
index 000000000000..8eafcfa3440e
--- /dev/null
+++ b/sys-apps/acl/Manifest
@@ -0,0 +1 @@
+DIST acl-2.3.2.tar.xz 371680 BLAKE2B 9f2abfddcd403df2c716c05f02a1b52453613d10948dc58a65b9ef41b44e37db6de99fb22dcfc4f6f0fb5d0319c939da61bd4e0fba2cdb5643e8087ecd34eeac SHA512 c2d061dbfd28c00cecbc1ae614d67f3138202bf4d39b383f2df4c6a8b10b830f33acec620fb211f268478737dde4037d338a5823af445253cb088c48a135099b
diff --git a/sys-apps/acl/acl-2.3.2-r3.ebuild b/sys-apps/acl/acl-2.3.2-r3.ebuild
new file mode 100644
index 000000000000..d760e0734e66
--- /dev/null
+++ b/sys-apps/acl/acl-2.3.2-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="Access control list utilities, libraries, and headers"
+HOMEPAGE="https://savannah.nongnu.org/projects/acl"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1+ GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
+IUSE="nls static-libs"
+
+RDEPEND="
+ >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}/acl-2.3.2-memory.patch"
+)
+
+src_prepare() {
+ default
+
+ # bug #580792
+ elibtoolize
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/bin
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)
+ --enable-largefile
+ $(use_enable static-libs static)
+ $(use_enable nls)
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ # Tests call native binaries with an LD_PRELOAD wrapper
+ # bug #772356
+ multilib_is_native_abi && default
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -type f -name "*.la" -delete || die
+ fi
+}
diff --git a/sys-apps/acl/files/acl-2.3.2-memory.patch b/sys-apps/acl/files/acl-2.3.2-memory.patch
new file mode 100644
index 000000000000..5727f3541e62
--- /dev/null
+++ b/sys-apps/acl/files/acl-2.3.2-memory.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/970228
+https://cgit.git.savannah.nongnu.org/cgit/acl.git/commit/?id=56abe432b65801f31277fb9a3bca0f9e31502315
+
+From 56abe432b65801f31277fb9a3bca0f9e31502315 Mon Sep 17 00:00:00 2001
+From: Matthias Gerstner <matthias.gerstner@suse.de>
+Date: Thu, 25 Apr 2024 12:43:49 +0200
+Subject: libmisc: __acl_get_uid(): fix memory wasting loop if user does not
+ exist
+
+I noticed that `acl_from_text()` unexpectedly returns ENOMEM for invalid
+user names. The reason for this is a missing break statement in the for
+loop in `__acl_get_uid()`, which causes the loop to act as if ERANGE was
+returned from `getpwnam_r()`, thereby exponentially increasing the
+buffer size to (in my case) multiple gigabytes, until `grow_buffer()`
+reports ENOMEM, which terminates the `__acl_get_uid()` function.
+
+This is a pretty costly "no such user" lookup that can disturb a
+process's heap memory management, but can also cause a process to fail
+e.g. if it is multithreaded and other threads encounter an ENOMEM,
+before `__acl_get_uid()` frees the gigantic heap buffer and returns.
+The allocated memory isn't actually used. Therefore on Linux it should
+not affect other processes by default, due to its overcommit memory
+and lazy memory allocation strategy.
+
+Fix this by properly terminating the for loop on any conditions except
+an ERANGE error being reported. The same break statement correctly
+exists in `__acl_get_gid()` already.
+
+Fixes: 3737f00 ("use thread-safe getpwnam_r and getgrnam_r")
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+---
+ libmisc/uid_gid_lookup.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libmisc/uid_gid_lookup.c b/libmisc/uid_gid_lookup.c
+index a4f21f6..74baab4 100644
+--- a/libmisc/uid_gid_lookup.c
++++ b/libmisc/uid_gid_lookup.c
+@@ -91,6 +91,7 @@ __acl_get_uid(const char *token, uid_t *uid_p)
+ if (err == ERANGE)
+ continue;
+ errno = err ? err : EINVAL;
++ break;
+ }
+ free(buffer);
+ return result ? 0 : -1;
+--
+cgit v1.2.3
+
diff --git a/sys-apps/acl/metadata.xml b/sys-apps/acl/metadata.xml
new file mode 100644
index 000000000000..113f53942a33
--- /dev/null
+++ b/sys-apps/acl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:xfs:acl</remote-id>
+ </upstream>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>