From ec27939f53a629e35181945a4e8c2912499b4bc4 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Fri, 6 Jun 2025 15:31:42 +0800 Subject: [PATCH] Fix the failure of testcase restore.test --- ...the-failure-of-testcase-restore-test.patch | 43 +++++++++++++++++++ acl.spec | 6 ++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-the-failure-of-testcase-restore-test.patch diff --git a/0001-Fix-the-failure-of-testcase-restore-test.patch b/0001-Fix-the-failure-of-testcase-restore-test.patch new file mode 100644 index 0000000..388c49e --- /dev/null +++ b/0001-Fix-the-failure-of-testcase-restore-test.patch @@ -0,0 +1,43 @@ +From f767f07a0be46abb5de0efda931a86b8a43ff05e Mon Sep 17 00:00:00 2001 +From: yixiangzhike +Date: Fri, 6 Jun 2025 14:49:22 +0800 +Subject: [PATCH] Fix the failure of testcase restore.test + +The commit 3737f00 adds the minimum buflen +to 170000 in getpwnam_r and getgrnam_r, so +the input buflen for calling getpwnam_r or +getgrnam_r should >= 170000 in getpwnam and getgrname. +--- + test/test_group.c | 2 +- + test/test_passwd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/test_group.c b/test/test_group.c +index 96dd612..1615279 100644 +--- a/test/test_group.c ++++ b/test/test_group.c +@@ -132,7 +132,7 @@ int getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen, + EXPORT + struct group *getgrnam(const char *name) + { +- static char buf[16384]; ++ static char buf[170000]; + static struct group grp; + struct group *result; + +diff --git a/test/test_passwd.c b/test/test_passwd.c +index 9428bf8..a065322 100644 +--- a/test/test_passwd.c ++++ b/test/test_passwd.c +@@ -127,7 +127,7 @@ int getpwnam_r(const char *name, struct passwd *pwd, char *buf, size_t buflen, + EXPORT + struct passwd *getpwnam(const char *name) + { +- static char buf[16384]; ++ static char buf[170000]; + static struct passwd pwd; + struct passwd *result; + +-- +2.43.0 + diff --git a/acl.spec b/acl.spec index f21fe2a..6066dfb 100644 --- a/acl.spec +++ b/acl.spec @@ -1,6 +1,6 @@ Name: acl Version: 2.3.2 -Release: 1 +Release: 2 Summary: Commands for manipulating POSIX access control lists License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -8,6 +8,7 @@ URL: https://savannah.nongnu.org/projects/acl Source0: http://download.savannah.nongnu.org/releases/acl/%{name}-%{version}.tar.xz Patch1: backport-acl_copy_entry-Prevent-accidental-NULL-pointer-deref.patch +Patch2: 0001-Fix-the-failure-of-testcase-restore-test.patch BuildRequires: libattr-devel gawk libtool gettext BuildRequires: chrpath @@ -82,6 +83,9 @@ fi %{_mandir}/man?/* %changelog +* Mon Jun 9 2025 yixiangzhike - 2.3.2-2 +- Fix the failure of testcase restore.test + * Sun Aug 11 2024 Funda Wang - 2.3.2-1 - update to 2.3.2 - drop useless ld.so.conf.d scriptlet -- Gitee