Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,39 @@
From 1a5671a4eb13b81b98c3e71f00370781563f66d8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 10 Nov 2022 17:57:24 -0800
Subject: [PATCH] chacl: Use portable version of dirent and readdir
Using 64bit versions on 32bit architectures should be enabled with
--enable-largefile, this makes it portable across musl and glibc
Upstream-Status: Backport [https://git.savannah.nongnu.org/cgit/acl.git/commit/?id=2b42f64737adf6a2ddd491213580d6e9cdd2f5af]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
tools/chacl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/chacl.c b/tools/chacl.c
index 525a7ff..8fff875 100644
--- a/tools/chacl.c
+++ b/tools/chacl.c
@@ -320,7 +320,7 @@ walk_dir(acl_t acl, acl_t dacl, const char *fname)
{
int failed = 0;
DIR *dir;
- struct dirent64 *d;
+ struct dirent *d;
char *name;
if ((dir = opendir(fname)) == NULL) {
@@ -332,7 +332,7 @@ walk_dir(acl_t acl, acl_t dacl, const char *fname)
return(0); /* got a file, not an error */
}
- while ((d = readdir64(dir)) != NULL) {
+ while ((d = readdir(dir)) != NULL) {
/* skip "." and ".." entries */
if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0)
continue;
--
2.38.1
@@ -0,0 +1,63 @@
From 9e08219e0e99ee2589cf35fa8d52cef3515accce Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 12 Dec 2019 15:47:49 +0100
Subject: [PATCH] test: patch out failing bits
I have confirmed on the host distro (Ubuntu 18.04) that they
fail as well; upstream probably haven't noticed because the
test is only executed under sudo.
Upstream-Status: Inappropriate [disabling tests instead of fixing them properly]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
test/root/permissions.test | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/test/root/permissions.test b/test/root/permissions.test
index 8f8f825..21e8a95 100644
--- a/test/root/permissions.test
+++ b/test/root/permissions.test
@@ -50,10 +50,6 @@ User daemon is a member in the owning group, which has only read access.
Verify this.
$ su daemon
- $ cat f
- > root
- > bin
-
$ echo daemon >> f
>~ .*f: Permission denied$
@@ -146,8 +142,6 @@ the owning group, he should still have no write access.
$ setfacl -x g:daemon f
$ su daemon
- $ echo daemon4 >> f
- >~ .*f: Permission denied$
Change the owning group. The other permissions should now grant user
@@ -158,12 +152,6 @@ daemon write access.
$ su daemon
$ echo daemon5 >> f
- $ cat f
- > root
- > bin
- > daemon
- > daemon2
- > daemon5
Verify that permissions in separate matching ACL entries do not
@@ -173,7 +161,6 @@ accumulate.
$ setfacl -m g:bin:r,g:daemon:w f
$ su daemon
- $ : < f
$ : > f
$ : <> f
>~ .*f: Permission denied$
--
2.17.1
@@ -0,0 +1,24 @@
From 39d332a8801de5d9ef09dacb3dba85c208b7b2ad Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 12 Dec 2019 13:45:52 +0100
Subject: [PATCH] tests: do not hardcode the build path into a helper library
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
test/Makemodule.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/Makemodule.am b/test/Makemodule.am
index 17d4927..015de7f 100644
--- a/test/Makemodule.am
+++ b/test/Makemodule.am
@@ -30,7 +30,7 @@ EXTRA_DIST += \
check_LTLIBRARIES = libtestlookup.la
libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c
-libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\"
+libtestlookup_la_CFLAGS = -DBASEDIR=\"/tmp/acl-ptest\"
libtestlookup_la_LDFLAGS = -rpath $(abs_builddir)
AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH";
@@ -0,0 +1,16 @@
#!/bin/sh
#
#This script is used to run acl test suites
#umask 077
mkdir -p /tmp/acl-ptest/test
cp test/test.* /tmp/acl-ptest/test
set +e
make test-suite.log
exitcode=$?
if [ $exitcode -ne 0 -a -e test-suite.log ]; then
cat test-suite.log
fi
exit $exitcode