Initialize for acl

This commit is contained in:
zyppe 2024-02-05 15:33:24 +08:00
commit c53d64c64b
42 changed files with 17478 additions and 0 deletions

1
.acl.metadata Normal file
View file

@ -0,0 +1 @@
b2cdd6944aaec11e46c1ea7547f529024cf6e4dd77484bbff86d3bbe34ae216d acl-2.2.52.tar.bz2

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
acl-2.2.52.tar.bz2

View file

@ -0,0 +1,25 @@
From cd76644ce9b9814a856579e2b98d4060d19cb162 Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.co>
Date: Mon, 20 May 2013 06:15:15 -0700
Subject: [PATCH 01/34] Install the libraries to the appropriate directory
---
include/builddefs.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/builddefs.in b/include/builddefs.in
index 434ce95..5c3e0d6 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -31,7 +31,7 @@ PKG_DISTRIBUTION= @pkg_distribution@
PKG_BIN_DIR = @bindir@
PKG_SBIN_DIR = @sbindir@
PKG_LIB_DIR = @libdir@@libdirsuffix@
-PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@
+PKG_DEVLIB_DIR = @libdir@@libdirsuffix@
PKG_INC_DIR = @includedir@
PKG_MAN_DIR = @mandir@
PKG_DOC_DIR = @datadir@/doc/@pkg_name@
--
2.5.2

View file

@ -0,0 +1,49 @@
From 100baaf89cdcb01a1c8d4b05782d7fba56813f96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
Date: Wed, 26 Dec 2012 15:16:40 -0300
Subject: [PATCH] Use OS byteswapping macros
while the code already includes "endian.h" it goes ahead
redefining byteswapping routines, thus defeating the very purpose
of the header.
---
libacl/byteorder.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/libacl/byteorder.h b/libacl/byteorder.h
index 05f5d87..65c87f3 100644
--- a/libacl/byteorder.h
+++ b/libacl/byteorder.h
@@ -17,21 +17,12 @@
#include <endian.h>
-#if __BYTE_ORDER == __BIG_ENDIAN
-# define cpu_to_le16(w16) le16_to_cpu(w16)
-# define le16_to_cpu(w16) ((u_int16_t)((u_int16_t)(w16) >> 8) | \
- (u_int16_t)((u_int16_t)(w16) << 8))
-# define cpu_to_le32(w32) le32_to_cpu(w32)
-# define le32_to_cpu(w32) ((u_int32_t)( (u_int32_t)(w32) >>24) | \
- (u_int32_t)(((u_int32_t)(w32) >> 8) & 0xFF00) | \
- (u_int32_t)(((u_int32_t)(w32) << 8) & 0xFF0000) | \
- (u_int32_t)( (u_int32_t)(w32) <<24))
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define cpu_to_le16(w16) ((u_int16_t)(w16))
-# define le16_to_cpu(w16) ((u_int16_t)(w16))
-# define cpu_to_le32(w32) ((u_int32_t)(w32))
-# define le32_to_cpu(w32) ((u_int32_t)(w32))
-#else
-# error unknown endianess?
-#endif
+# define cpu_to_le16(w16) htole16(w16)
+
+# define le16_to_cpu(w16) le16toh(w16)
+
+# define cpu_to_le32(w32) htole32(w32)
+
+# define le32_to_cpu(w32) le32toh(w32)
+
--
1.8.0.2

View file

@ -0,0 +1,456 @@
From f2feb94748bd3c64ed153461afa51aebbd717821 Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <jeffm@suse.com>
Date: Wed, 2 Dec 2015 11:09:51 -0500
Subject: [PATCH 1/2] test: Add helper library to fake passwd/group files
References: bsc#953659
Git-commit: f2feb94748bd3c64ed153461afa51aebbd717821
The requirements for testing are currently that the system have several
users and groups predefined. The chosen users and groups are typically
found on every system so that's a safe bet. However, tests for the quote
code may involve more esoteric names that include backslashes or other
quoted characters. This patch adds a helper library that implements
the passwd and group calls and redirects the reads to project-defined
passwd and group files. That way, we know for certain that those
usernames and groups will be found during testing. The helper library is
enabled using LD_PRELOAD via a wrapper script. The library will not be
installed as part of the project's make install. Since the local user
might not be found in the local test.{group,passwd}, we extend test/run
to use numeric uid/gids if the lookup fails.
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
test/Makemodule.am | 11 +++-
test/run | 17 ++++--
test/runwrapper | 6 +++
test/test.group | 3 ++
test/test.passwd | 5 ++
test/test_group.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++
test/test_passwd.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 341 insertions(+), 4 deletions(-)
create mode 100755 test/runwrapper
create mode 100644 test/test.group
create mode 100644 test/test.passwd
create mode 100644 test/test_group.c
create mode 100644 test/test_passwd.c
diff --git a/test/Makemodule.am b/test/Makemodule.am
index 7b8dafe..488d17e 100644
--- a/test/Makemodule.am
+++ b/test/Makemodule.am
@@ -20,8 +20,17 @@ EXTRA_DIST += \
test/make-tree \
test/malformed-restore-double-owner.acl \
test/run \
+ test/runwrapper \
test/sort-getfacl-output \
+ test/test.passwd \
+ test/test.group \
$(TESTS)
+check_LTLIBRARIES = libtestlookup.la
+
+libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c
+libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\"
+libtestlookup_la_LDFLAGS = -rpath $(abs_builddir)
+
AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH";
-TEST_LOG_COMPILER = $(srcdir)/test/run
+TEST_LOG_COMPILER = $(srcdir)/test/runwrapper
diff --git a/test/run b/test/run
index fcbcf29..721b58a 100755
--- a/test/run
+++ b/test/run
@@ -43,12 +43,12 @@ use File::Basename qw(basename dirname);
use File::Path qw(rmtree);
use Getopt::Std;
use POSIX qw(isatty setuid getcwd);
-use vars qw($opt_l $opt_v);
+use vars qw($opt_l $opt_v $opt_t);
no warnings qw(taint);
$opt_l = ~0; # a really huge number
-getopts('l:v');
+getopts('l:vt:');
my ($OK, $FAILED) = ("ok", "failed");
if (isatty(fileno(STDOUT))) {
@@ -63,7 +63,18 @@ $ENV{"PATH"} = $ENV{"TESTDIR"} . ":$ENV{PATH}";
# Add the parent dir to PATH so we can find the compiled tools.
$ENV{"PATH"} = dirname(abs_path(dirname($0))) . ":$ENV{PATH}";
$ENV{"TUSER"} = getpwuid($>);
+if (!defined($ENV{"TUSER"})) {
+ # If the uid isn't found in the private passwd file, just use the
+ # uid directly.
+ $ENV{"TUSER"} = $>;
+}
$ENV{"TGROUP"} = getgrgid($));
+if (!defined($ENV{"TGROUP"})) {
+ # If the groupid isn't found in the private group file, just use the
+ # gid directly.
+ my @groups = split(/ /, $();
+ $ENV{"TGROUP"} = $groups[0];
+}
open(TEST_FILE, $ARGV[0]);
@@ -92,7 +103,7 @@ for (;;) {
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
$line =~ s[%(\w+)][$ENV{$1}]eg;
- $line =~ s[%{(\w+)}][$ENV{$1}]eg;
+ $line =~ s[%\{(\w+)\}][$ENV{$1}]eg;
}
if (defined $line) {
if ($line =~ s/^\s*< ?//) {
diff --git a/test/runwrapper b/test/runwrapper
new file mode 100755
index 0000000..38de337
--- /dev/null
+++ b/test/runwrapper
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [ -e "$PWD/.libs/libtestlookup.so" ]; then
+ export LD_PRELOAD="$PWD/.libs/libtestlookup.so"
+fi
+
+$PWD/test/run $@
diff --git a/test/test.group b/test/test.group
new file mode 100644
index 0000000..5f9ca8f
--- /dev/null
+++ b/test/test.group
@@ -0,0 +1,3 @@
+bin:x:1:daemon
+daemon:x:2:
+users:x:100:
diff --git a/test/test.passwd b/test/test.passwd
new file mode 100644
index 0000000..a917bdd
--- /dev/null
+++ b/test/test.passwd
@@ -0,0 +1,5 @@
+root:x:0:0:root:/:/bin/false
+bin:x:1:1:bin:/:/bin/false
+daemon:x:2:2:Daemon:/:/bin/false
+domain\user:x:3:3:Test user:/:/bin/false
+domain\12345:x:4:4:Test user:/:/bin/false
diff --git a/test/test_group.c b/test/test_group.c
new file mode 100644
index 0000000..7fe6a19
--- /dev/null
+++ b/test/test_group.c
@@ -0,0 +1,154 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <libgen.h>
+#include <limits.h>
+#include <grp.h>
+
+#define TEST_GROUP "test/test.group"
+static char grfile[PATH_MAX];
+static void setup_grfile() __attribute__((constructor));
+
+void setup_grfile() {
+ snprintf(grfile, sizeof(grfile), "%s/%s", BASEDIR, TEST_GROUP);
+}
+
+#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
+#define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)
+
+int test_getgrent_r(FILE *file, struct group *grp, char *buf,
+ size_t buflen, struct group **result)
+{
+ char *line, *str, *remain;
+ int count, index = 0;
+ int gr_mem_cnt = 0;
+
+ *result = NULL;
+
+ line = fgets(buf, buflen, file);
+ if (!line)
+ return 0;
+
+ /* We'll stuff the gr_mem array in the remaining space in the buffer */
+ remain = buf + ALIGN(line + strlen(line) - buf, sizeof(char *));
+ grp->gr_mem = (char **)remain;
+ count = (buf + buflen - remain) / sizeof (char *);
+ if (!count) {
+ errno = ERANGE;
+ return -1;
+ }
+
+ grp->gr_mem[--count] = NULL;
+
+ while ((str = strtok(line, ":"))) {
+ char *ptr;
+ switch (index++) {
+ case 0:
+ grp->gr_name = str;
+ break;
+ case 1:
+ grp->gr_passwd = str;
+ break;
+ case 2:
+ errno = 0;
+ grp->gr_gid = strtol(str, NULL, 10);
+ if (errno)
+ return -1;
+ break;
+ case 3:
+ while ((str = strtok_r(str, ",", &ptr))) {
+ if (count-- <= 0) {
+ errno = ERANGE;
+ return -1;
+ }
+ grp->gr_mem[gr_mem_cnt++] = str;
+ str = NULL;
+ }
+ }
+ line = NULL;
+ }
+
+ *result = grp;
+
+ return 0;
+}
+
+int test_getgr_match(struct group *grp, char *buf, size_t buflen,
+ struct group **result,
+ int (*match)(const struct group *, const void *),
+ const void *data)
+{
+ FILE *file;
+ struct group *_result;
+
+ *result = NULL;
+
+ file = fopen(grfile, "r");
+ if (!file) {
+ errno = EBADF;
+ return -1;
+ }
+
+ errno = 0;
+ while (!test_getgrent_r(file, grp, buf, buflen, &_result)) {
+ if (!_result)
+ break;
+ else if (match(grp, data)) {
+ *result = grp;
+ break;
+ }
+ }
+
+ fclose(file);
+ if (!errno && !*result)
+ errno = ENOENT;
+ if (errno)
+ return -1;
+ return 0;
+}
+
+static int match_name(const struct group *grp, const void *data)
+{
+ const char *name = data;
+ return !strcmp(grp->gr_name, name);
+}
+
+int getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen,
+ struct group **result)
+{
+ return test_getgr_match(grp, buf, buflen, result, match_name, name);
+}
+
+struct group *getgrnam(const char *name)
+{
+ static char buf[16384];
+ static struct group grp;
+ struct group *result;
+
+ (void) getgrnam_r(name, &grp, buf, sizeof(buf), &result);
+ return result;
+}
+
+static int match_gid(const struct group *grp, const void *data)
+{
+ gid_t gid = *(gid_t *)data;
+ return grp->gr_gid == gid;
+}
+
+int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen,
+ struct group **result)
+{
+ return test_getgr_match(grp, buf, buflen, result, match_gid, &gid);
+}
+
+struct group *getgrgid(gid_t gid)
+{
+ static char buf[16384];
+ static struct group grp;
+ struct group *result;
+
+ (void) getgrgid_r(gid, &grp, buf, sizeof(buf), &result);
+ return result;
+}
diff --git a/test/test_passwd.c b/test/test_passwd.c
new file mode 100644
index 0000000..b5052f8
--- /dev/null
+++ b/test/test_passwd.c
@@ -0,0 +1,149 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <libgen.h>
+#include <limits.h>
+#include <pwd.h>
+
+#define TEST_PASSWD "test/test.passwd"
+static char pwfile[PATH_MAX];
+static void setup_pwfile() __attribute__((constructor));
+
+void setup_pwfile() {
+ snprintf(pwfile, sizeof(pwfile), "%s/%s", BASEDIR, TEST_PASSWD);
+}
+
+#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
+#define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)
+
+int test_getpwent_r(FILE *file, struct passwd *pwd, char *buf,
+ size_t buflen, struct passwd **result)
+{
+ char *str, *line;
+ int index = 0;
+
+ *result = NULL;
+
+ line = fgets(buf, buflen, file);
+ if (!line) {
+ return 0;
+ }
+
+ while ((str = strtok(line, ":"))) {
+ switch (index++) {
+ case 0:
+ pwd->pw_name = str;
+ break;
+ case 1:
+ pwd->pw_passwd = str;
+ break;
+ case 2:
+ errno = 0;
+ pwd->pw_uid = strtol(str, NULL, 10);
+ if (errno)
+ return -1;
+ break;
+ case 3:
+ errno = 0;
+ pwd->pw_gid = strtol(str, NULL, 10);
+ if (errno)
+ return -1;
+ break;
+ case 4:
+ pwd->pw_gecos = str;
+ break;
+ case 5:
+ pwd->pw_dir = str;
+ break;
+ case 6:
+ pwd->pw_shell = str;
+ break;
+ }
+ line = NULL;
+ }
+
+ *result = pwd;
+
+ return 0;
+}
+
+int test_getpw_match(struct passwd *pwd, char *buf, size_t buflen,
+ struct passwd **result,
+ int (*match)(const struct passwd *, const void *),
+ const void *data)
+{
+ FILE *file;
+ struct passwd *_result;
+
+ *result = NULL;
+
+ file = fopen(pwfile, "r");
+ if (!file) {
+ fprintf(stderr, "Failed to open %s\n", pwfile);
+ errno = EBADF;
+ return -1;
+ }
+
+ errno = 0;
+ while (!test_getpwent_r(file, pwd, buf, buflen, &_result)) {
+ if (!_result)
+ break;
+ else if (match(pwd, data)) {
+ *result = pwd;
+ break;
+ }
+ }
+
+ fclose(file);
+ if (!errno && !*result)
+ errno = ENOENT;
+ if (errno)
+ return -1;
+ return 0;
+}
+
+static int match_name(const struct passwd *pwd, const void *data)
+{
+ const char *name = data;
+ return !strcmp(pwd->pw_name, name);
+}
+
+int getpwnam_r(const char *name, struct passwd *pwd, char *buf, size_t buflen,
+ struct passwd **result)
+{
+ return test_getpw_match(pwd, buf, buflen, result, match_name, name);
+}
+
+struct passwd *getpwnam(const char *name)
+{
+ static char buf[16384];
+ static struct passwd pwd;
+ struct passwd *result;
+
+ (void) getpwnam_r(name, &pwd, buf, sizeof(buf), &result);
+ return result;
+}
+
+static int match_uid(const struct passwd *pwd, const void *data)
+{
+ uid_t uid = *(uid_t *)data;
+ return pwd->pw_uid == uid;
+}
+
+int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen,
+ struct passwd **result)
+{
+ return test_getpw_match(pwd, buf, buflen, result, match_uid, &uid);
+}
+
+struct passwd *getpwuid(uid_t uid)
+{
+ static char buf[16384];
+ static struct passwd pwd;
+ struct passwd *result;
+
+ (void) getpwuid_r(uid, &pwd, buf, sizeof(buf), &result);
+ return result;
+}
--
2.16.4

View file

@ -0,0 +1,135 @@
From b6ba5c29a2ad9dcaac4191e81d2b497d396fa7d1 Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <jeffm@suse.com>
Date: Wed, 2 Dec 2015 11:09:52 -0500
Subject: [PATCH 2/2] quote: escape literal backslashes
References: bsc#953659
Git-commit: b6ba5c29a2ad9dcaac4191e81d2b497d396fa7d1
The octal unquote code can't handle escaping backslashes except by
specifying the octal code for the backslash. That's not exactly a
user-friendly interface for a scenario that may not be that uncommon.
The unquote code isn't documented in the man page and can result in
confusion when specifying names via a Windows domain that are entirely
numeric (e.g. WINDOM\1234).
This patch adds handling to allow literal escaping of the backslash (\\)
as both input and output and documents the quoting rules in the setfacl
man page. Also included are test cases for escaped backslashes followed
by letters, escaped backslashes followed by numbers, and the original
use case of escaped character literals.
[Minor fixes by Andreas Gruenbacher.]
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
libmisc/quote.c | 5 ++++-
libmisc/unquote.c | 2 ++
man/man1/setfacl.1 | 8 +++++++-
test/misc.test | 39 +++++++++++++++++++++++++++++++++++++++
4 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/libmisc/quote.c b/libmisc/quote.c
index a28800c..a24c958 100644
--- a/libmisc/quote.c
+++ b/libmisc/quote.c
@@ -44,11 +44,14 @@ const char *__acl_quote(const char *str, const char *quote_chars)
(s - (unsigned char *)str) + nonpr * 3 + 1))
return NULL;
for (s = (unsigned char *)str, q = quoted_str; *s != '\0'; s++) {
- if (*s == '\\' || strchr(quote_chars, *s)) {
+ if (strchr(quote_chars, *s)) {
*q++ = '\\';
*q++ = '0' + ((*s >> 6) );
*q++ = '0' + ((*s >> 3) & 7);
*q++ = '0' + ((*s ) & 7);
+ } else if (*s == '\\') {
+ *q++ = '\\';
+ *q++ = '\\';
} else
*q++ = *s;
}
diff --git a/libmisc/unquote.c b/libmisc/unquote.c
index 4f4ce7c..b8b3505 100644
--- a/libmisc/unquote.c
+++ b/libmisc/unquote.c
@@ -46,6 +46,8 @@ char *__acl_unquote(char *str)
((*(s+2) - '0') << 3) +
((*(s+3) - '0') );
s += 3;
+ } else if (*s == '\\' && *(s+1) == '\\') {
+ *t++ = *s++;
} else
*t++ = *s;
} while (*s++ != '\0');
diff --git a/man/man1/setfacl.1 b/man/man1/setfacl.1
index a73d122..3d06031 100644
--- a/man/man1/setfacl.1
+++ b/man/man1/setfacl.1
@@ -190,7 +190,13 @@ For
.I uid
and
.I gid
-you can specify either a name or a number.
+you can specify either a name or a number. Character literals may be specified
+with a backslash followed by the 3-digit octal digits corresponding to the
+ASCII code for the character (e.g.,
+.I \e101
+for 'A'). If the name contains a literal backslash followed by 3 digits, the
+backslash must be escaped (i.e.,
+.IR "\e\e" ).
.PP
The
.I perms
diff --git a/test/misc.test b/test/misc.test
index 29372b7..c4d9774 100644
--- a/test/misc.test
+++ b/test/misc.test
@@ -454,6 +454,45 @@ Dangling symlink test http://savannah.nongnu.org/bugs/?28131
> setfacl: d/b: No such file or directory
$ rm -R d
+Handle escaped literal backslash followed by numeric username
+ $ mkdir d
+ $ touch d/f
+ $ setfacl -m u:domain\\\\12345:rw- d/f
+ $ getfacl --omit-header d/f
+ > user::rw-
+ > user:domain\\12345:rw-
+ > group::rw-
+ > mask::rw-
+ > other::r--
+ >
+ $ rm -R d
+
+Handle escaped literal backslash
+ $ mkdir d
+ $ touch d/f
+ $ setfacl -m u:domain\\\\user:rw- d/f
+ $ getfacl --omit-header d/f
+ > user::rw-
+ > user:domain\\user:rw-
+ > group::rw-
+ > mask::rw-
+ > other::r--
+ >
+ $ rm -R d
+
+Handle escaped literal characters by octal code (bin)
+ $ mkdir d
+ $ touch d/f
+ $ setfacl -m u:\\142\\151\\156:rw- d/f
+ $ getfacl --omit-header d/f
+ > user::rw-
+ > user:bin:rw-
+ > group::rw-
+ > mask::rw-
+ > other::r--
+ >
+ $ rm -R d
+
Malformed restore file
$ echo "# owner: root" > f
--
2.16.4

View file

@ -0,0 +1,28 @@
From 48cd4fe761e396e8897bf661ff81b86331ca2439 Mon Sep 17 00:00:00 2001
From: John Bradshaw <john@johnbradshaw.org>
Date: Mon, 20 May 2013 13:41:32 +0200
Subject: [PATCH 02/34] setfacl.1: fix typo 'inclu de' -> 'include'
Bug: https://bugzilla.redhat.com/675451
---
man/man1/setfacl.1 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/man1/setfacl.1 b/man/man1/setfacl.1
index 64f0e33..0c7c046 100644
--- a/man/man1/setfacl.1
+++ b/man/man1/setfacl.1
@@ -240,8 +240,8 @@ owner, owning group, or others entry, a copy of the ACL owner, owning group, or
.IP * 4
If a Default ACL contains named user entries or named group entries, and no mask entry exists, a mask entry containing the same permissions as the default Default ACL's group entry is added. Unless the
.I \-n
-option is given, the permissions of the mask entry are further adjusted to inclu
-de the union of all permissions affected by the mask entry. (See the
+option is given, the permissions of the mask entry are further adjusted to
+include the union of all permissions affected by the mask entry. (See the
.I \-n
option description).
.PP
--
2.5.2

View file

@ -0,0 +1,102 @@
From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 20 May 2013 16:38:06 +0200
Subject: [PATCH 03/34] test: fix insufficient quoting of '\'
This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
caused sbits-restore.test to fail in the following way in case SELinux
was disabled:
*** sbits-restore.test ***
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ touch d/g -- ok
[6] $ touch d/u -- ok
[7] $ chmod u+s d/u -- ok
[8] $ chmod g+s d/g -- ok
[9] $ chmod +t d -- ok
[10] $ getfacl -R d > d.acl -- ok
[11] $ rm -R d -- ok
[12] $ mkdir d -- ok
[13] $ touch d/g -- ok
[14] $ touch d/u -- ok
[15] $ setfacl --restore d.acl -- ok
[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
drwxr-xr- != drwxr-xr-t
[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
-rwSr--r- != -rwSr--r--
[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
-rw-r-Sr- != -rw-r-Sr--
[22] $ rm -Rf d -- ok
17 commands (14 passed, 3 failed)
---
test/cp.test | 2 +-
test/misc.test | 6 +++---
test/sbits-restore.test | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/cp.test b/test/cp.test
index 0867f63..a927195 100644
--- a/test/cp.test
+++ b/test/cp.test
@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
> -rw-rw-r--+
$ cp f g
- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
+ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
> -rw-r--r--
$ rm g
diff --git a/test/misc.test b/test/misc.test
index 6e98053..29372b7 100644
--- a/test/misc.test
+++ b/test/misc.test
@@ -254,7 +254,7 @@ Add some users and groups
Symlink in directory with default ACL?
$ ln -s d d/l
- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
> lrwxrwxrwx
$ ls -dl -L d/l | awk '{print $1}'
@@ -343,7 +343,7 @@ Remove the default ACL
Reset to base entries
$ setfacl -b d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxr-x---
$ getfacl --omit-header d
@@ -355,7 +355,7 @@ Reset to base entries
Now, chmod should change the group_obj entry
$ chmod 775 d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxrwxr-x
$ getfacl --omit-header d
diff --git a/test/sbits-restore.test b/test/sbits-restore.test
index de21340..5899b0a 100644
--- a/test/sbits-restore.test
+++ b/test/sbits-restore.test
@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
$ touch d/g
$ touch d/u
$ setfacl --restore d.acl
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
> drwxr-xr-t
- $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
> -rwSr--r--
- $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
> -rw-r-Sr--
$ rm -Rf d
--
2.5.2

View file

@ -0,0 +1,29 @@
From 57a78716049833b9ed662a0a45b6102e2aa9f970 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 20 May 2013 14:26:32 -0400
Subject: [PATCH 04/34] Makefile: rename configure.in to configure.ac
The Makefile references the configure source file by name, so update
that after the rename.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index dce32d3..d1188f2 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ CONFIGURE = \
ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
m4/ltversion.m4 m4/lt~obsolete.m4
LSRCFILES = \
- configure.in Makepkgs install-sh exports README VERSION \
+ configure.ac Makepkgs install-sh exports README VERSION \
$(CONFIGURE)
LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
--
2.5.2

View file

@ -0,0 +1,92 @@
From c000106df976473a79ec4afcfe0a4c303cafb823 Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond" <esr@thyrsus.com>
Date: Tue, 28 May 2013 15:35:55 +0200
Subject: [PATCH 05/34] Bad markup in acl.5 page
Use of low-level troff hackery to set special indents or breaks can't be
translated into HTML or structural markups. This page will have rendering
faults in HTML, and probably also under third-party man page browsers such as
Xman, Rosetta, and the KDE help browser. This patch eliminates .in in favor of
requests like .Bl/.Be that have structural translations.
---
man/man5/acl.5 | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/man/man5/acl.5 b/man/man5/acl.5
index aec58aa..1e44a31 100644
--- a/man/man5/acl.5
+++ b/man/man5/acl.5
@@ -170,14 +170,12 @@ the object will be granted.
the effective user ID of the process matches the user ID of the file object owner,
.Sy then
.Pp
-.in +4
-.Bd -filled
+.Bd -filled -offset indent
.Sy if
the ACL_USER_OBJ entry contains the requested permissions, access is granted,
.Pp
.Sy else
access is denied.
-.in -4
.Ed
.It
.Sy "else if"
@@ -185,15 +183,13 @@ the effective user ID of the process matches the qualifier of any entry
of type ACL_USER,
.Sy then
.Pp
-.in +4
-.Bd -filled
+.Bd -filled -offset indent
.Sy if
the matching ACL_USER entry and the ACL_MASK entry contain the requested
permissions, access is granted,
.Pp
.Sy else
access is denied.
-.in -4
.Ed
.It
.Sy else if
@@ -201,13 +197,11 @@ the effective group ID or any of the supplementary group IDs of the process
match the file group or the qualifier of any entry of type ACL_GROUP,
.Sy then
.Pp
-.in +4
-.Bd -filled
+.Bd -filled -offset indent
.Sy if
the ACL contains an ACL_MASK entry,
.Sy then
-.in +4
-.Bd -filled
+.Bd -filled -offset indent
.Sy if
the ACL_MASK entry and any of the matching ACL_GROUP_OBJ or ACL_GROUP entries
contain
@@ -216,12 +210,10 @@ the requested permissions, access is granted,
.Sy else
access is denied.
.Pp
-.in -4
.Ed
.Sy else
(note that there can be no ACL_GROUP entries without an ACL_MASK entry)
-.in +4
-.Bd -filled
+.Bd -filled -offset indent
.Sy if
the ACL_GROUP_OBJ entry contains the requested permissions,
access is granted,
@@ -230,7 +222,6 @@ access is granted,
.Sy else
access is denied.
.Pp
-.in -4
.Ed
.It
.Sy else if
--
2.5.2

View file

@ -0,0 +1,22 @@
From 63237b6d5a5ad1d5cc76d432336d904c3c567fd9 Mon Sep 17 00:00:00 2001
From: Fabrice Bauzac <fbauzac@amadeus.com>
Date: Mon, 5 Aug 2013 15:22:40 +0200
Subject: [PATCH 06/34] .gitignore: ignore *~ and config.h.in.
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 6113c60..0f018b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,5 @@ m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
+config.h.in
+*~
--
2.5.2

View file

@ -0,0 +1,26 @@
From c3ce1b78025002a404e5486bf8522ecf812cadcb Mon Sep 17 00:00:00 2001
From: Fabrice Bauzac <fbauzac@amadeus.com>
Date: Mon, 5 Aug 2013 15:23:17 +0200
Subject: [PATCH 07/34] Use autoreconf rather than autoconf to regenerate the
files.
---
doc/INSTALL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/INSTALL b/doc/INSTALL
index de99605..1e6ee51 100644
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -26,7 +26,7 @@ attribute library and utility from source, and how to install them.
If you want to build the package and install it manually, use the
following steps:
- # make configure (or run autoconf; ./configure)
+ # make configure (or run autoreconf; ./configure)
# make
# su root
# make install install-lib
--
2.5.2

View file

@ -0,0 +1,50 @@
From 3f079d4e0512c9a241fb23c56a0421441c83621e Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruen@linbit.com>
Date: Wed, 23 Oct 2013 19:40:57 +0200
Subject: [PATCH 08/34] libacl: Make sure that acl_from_text() always sets
errno when it fails
The getpwnam() and getgrnam() functions may or may not set errno when
they fail. If they don't, set it to EINVAL so that errno is always set
when acl_from_text() fails.
---
libacl/acl_from_text.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c
index 1e05322..c08bd3b 100644
--- a/libacl/acl_from_text.c
+++ b/libacl/acl_from_text.c
@@ -152,11 +152,14 @@ get_uid(const char *token, uid_t *uid_p)
if (get_id(token, uid_p) == 0)
return 0;
+ errno = 0;
passwd = getpwnam(token);
if (passwd) {
*uid_p = passwd->pw_uid;
return 0;
}
+ if (errno == 0)
+ errno = EINVAL;
return -1;
}
@@ -168,11 +171,14 @@ get_gid(const char *token, gid_t *gid_p)
if (get_id(token, (uid_t *)gid_p) == 0)
return 0;
+ errno = 0;
group = getgrnam(token);
if (group) {
*gid_p = group->gr_gid;
return 0;
}
+ if (errno == 0)
+ errno = EINVAL;
return -1;
}
--
2.5.2

View file

@ -0,0 +1,55 @@
From fb071c302b8cad8837bc1e57407dc3ffa14d3f99 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 31 Oct 2013 19:24:35 +0100
Subject: [PATCH 09/34] libacl: fix SIGSEGV of getfacl -e on overly long group
name
We simply make sure that at least one tab is used for indentation.
---
libacl/__acl_to_any_text.c | 5 +++++
test/root/getfacl.test | 17 +++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 test/root/getfacl.test
diff --git a/libacl/__acl_to_any_text.c b/libacl/__acl_to_any_text.c
index a4f9c34..1d10e81 100644
--- a/libacl/__acl_to_any_text.c
+++ b/libacl/__acl_to_any_text.c
@@ -247,6 +247,11 @@ acl_entry_to_any_str(const acl_entry_t entry_d, char *text_p, ssize_t size,
options & TEXT_ALL_EFFECTIVE) {
x = (options & TEXT_SMART_INDENT) ?
((text_p - orig_text_p)/8) : TABS-1;
+
+ /* use at least one tab for indentation */
+ if (x > (TABS-1))
+ x = (TABS-1);
+
strncpy(text_p, tabs+x, size);
ADVANCE(TABS-x);
diff --git a/test/root/getfacl.test b/test/root/getfacl.test
new file mode 100644
index 0000000..f84e25d
--- /dev/null
+++ b/test/root/getfacl.test
@@ -0,0 +1,17 @@
+Make sure that getfacl always adds at least one space between the permissions
+in an acl entry and the effective permissions comment.
+
+ $ umask 022
+ $ mkdir d
+ $ groupadd loooooooooooooooooooooooonggroup
+ $ setfacl -dm group:loooooooooooooooooooooooonggroup:rwx d
+ $ getfacl -cde d
+ > user::rwx
+ > group::r-x #effective:r-x
+ > group:loooooooooooooooooooooooonggroup:rwx #effective:rwx
+ > mask::rwx
+ > other::r-x
+ >
+
+ $ groupdel loooooooooooooooooooooooonggroup
+ $ rm -r d
--
2.5.2

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,180 @@
From 602dbcb26e9591922ca94f5b326694a2309fff18 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 10 Jan 2014 10:07:39 -0500
Subject: [PATCH 11/34] move gettext logic into misc.h
This lets us autogenerate config.h using autoheader rather than
hand maintain it.
---
chacl/chacl.c | 4 ++--
getfacl/getfacl.c | 5 ++---
include/config.h.in | 10 ----------
include/misc.h | 17 +++++++++++++++++
libacl/perm_copy.h | 2 ++
setfacl/do_set.c | 3 ++-
setfacl/setfacl.c | 5 ++---
7 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/chacl/chacl.c b/chacl/chacl.c
index 854a620..525a7ff 100644
--- a/chacl/chacl.c
+++ b/chacl/chacl.c
@@ -17,6 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -29,8 +30,7 @@
#include <sys/stat.h>
#include <sys/acl.h>
#include <acl/libacl.h>
-#include <locale.h>
-#include "config.h"
+#include "misc.h"
static int acl_delete_file (const char * path, acl_type_t type);
static int list_acl(char *file);
diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
index f8eaf25..22cc1c7 100644
--- a/getfacl/getfacl.c
+++ b/getfacl/getfacl.c
@@ -21,6 +21,7 @@
USA.
*/
+#include "config.h"
#include <stdio.h>
#include <errno.h>
#include <sys/acl.h>
@@ -34,11 +35,9 @@
#include <dirent.h>
#include <libgen.h>
#include <getopt.h>
-#include <locale.h>
-#include "config.h"
+#include "misc.h"
#include "user_group.h"
#include "walk_tree.h"
-#include "misc.h"
#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT"
diff --git a/include/config.h.in b/include/config.h.in
index 6787b6e..6a720ac 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -39,16 +39,6 @@
/* Define if you want gettext (I18N) support */
#undef ENABLE_GETTEXT
-#ifdef ENABLE_GETTEXT
-# include <libintl.h>
-# define _(x) gettext(x)
-#else
-# define _(x) (x)
-# define textdomain(d) do { } while (0)
-# define bindtextdomain(d,dir) do { } while (0)
-#endif
-#include <locale.h>
-
/* On GNU/kFreeBSD, ENODATA is not defined in the system headers */
#include <errno.h>
#ifndef ENODATA
diff --git a/include/misc.h b/include/misc.h
index 0c5fdcc..a4fa70e 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -15,9 +15,26 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __MISC_H
+#define __MISC_H
+
+#include <stdio.h>
+
extern int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
extern const char *quote(const char *str, const char *quote_chars);
extern char *unquote(char *str);
extern char *next_line(FILE *file);
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(x) gettext(x)
+#else
+# define _(x) (x)
+# define textdomain(d) do { } while (0)
+# define bindtextdomain(d,dir) do { } while (0)
+#endif
+#include <locale.h>
+
+#endif
diff --git a/libacl/perm_copy.h b/libacl/perm_copy.h
index 87b1566..350ae6a 100644
--- a/libacl/perm_copy.h
+++ b/libacl/perm_copy.h
@@ -35,3 +35,5 @@
#define HAVE_ACL_GET_TAG_TYPE 1
#define HAVE_ACL_SET_FD 1
#define HAVE_ACL_SET_FILE 1
+
+#include "misc.h"
diff --git a/setfacl/do_set.c b/setfacl/do_set.c
index 3e7e982..60da837 100644
--- a/setfacl/do_set.c
+++ b/setfacl/do_set.c
@@ -20,6 +20,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "config.h"
#include <stdio.h>
#include <errno.h>
#include <sys/acl.h>
@@ -33,10 +34,10 @@
#include <unistd.h>
#include <dirent.h>
#include <ftw.h>
+#include "misc.h"
#include "sequence.h"
#include "do_set.h"
#include "parse.h"
-#include "config.h"
#include "walk_tree.h"
diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
index 81062a6..f6135b7 100644
--- a/setfacl/setfacl.c
+++ b/setfacl/setfacl.c
@@ -20,6 +20,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "config.h"
#include <limits.h>
#include <stdio.h>
#include <string.h>
@@ -29,13 +30,11 @@
#include <dirent.h>
#include <libgen.h>
#include <getopt.h>
-#include <locale.h>
-#include "config.h"
+#include "misc.h"
#include "sequence.h"
#include "parse.h"
#include "do_set.h"
#include "walk_tree.h"
-#include "misc.h"
#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT"
--
2.5.2

View file

@ -0,0 +1,157 @@
From 2d13383b7fbcc04fc16681caa4f43d9d9083cca1 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 10 Jan 2014 10:07:40 -0500
Subject: [PATCH 12/34] test: make running parallel/out-of-tree safe
Change the run program to update PATH to find the tools locally
automatically. This lets us avoid having to always build in the
tree and allows for direct running.
Also update the program to create a tempdir for each test to run
inside of. This way we can run all the tests in parallel without
randomly clobbering each other.
---
test/getfacl-recursive.test | 12 ++++++------
test/malformed-restore.test | 2 +-
test/run | 29 ++++++++++++++++++++++++++++-
3 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/test/getfacl-recursive.test b/test/getfacl-recursive.test
index a72192e..8f5dd4e 100644
--- a/test/getfacl-recursive.test
+++ b/test/getfacl-recursive.test
@@ -5,7 +5,7 @@ Tests for proper path recursion
$ mkdir 1/link
$ touch 1/link/file
$ ln -s `pwd`/1/link 1/2/link
- $ getfacl -P -R 1/2 | ./sort-getfacl-output
+ $ getfacl -P -R 1/2 | sort-getfacl-output
> # file: 1/2
> # owner: %TUSER
> # group: %TGROUP
@@ -21,7 +21,7 @@ Tests for proper path recursion
> other::r-x
>
- $ getfacl -R 1/2 | ./sort-getfacl-output
+ $ getfacl -R 1/2 | sort-getfacl-output
> # file: 1/2
> # owner: %TUSER
> # group: %TGROUP
@@ -37,7 +37,7 @@ Tests for proper path recursion
> other::r-x
>
- $ getfacl -R -L 1/2 | ./sort-getfacl-output
+ $ getfacl -R -L 1/2 | sort-getfacl-output
> # file: 1/2
> # owner: %TUSER
> # group: %TGROUP
@@ -67,7 +67,7 @@ Tests for proper path recursion
> other::r--
>
- $ getfacl -P -R 1 | ./sort-getfacl-output
+ $ getfacl -P -R 1 | sort-getfacl-output
> # file: 1
> # owner: %TUSER
> # group: %TGROUP
@@ -104,7 +104,7 @@ Tests for proper path recursion
> other::r--
>
- $ getfacl -R 1 | ./sort-getfacl-output
+ $ getfacl -R 1 | sort-getfacl-output
> # file: 1
> # owner: %TUSER
> # group: %TGROUP
@@ -141,7 +141,7 @@ Tests for proper path recursion
> other::r--
>
- $ getfacl -R -L 1 | ./sort-getfacl-output
+ $ getfacl -R -L 1 | sort-getfacl-output
> # file: 1
> # owner: %TUSER
> # group: %TGROUP
diff --git a/test/malformed-restore.test b/test/malformed-restore.test
index e92b75b..5e5391c 100644
--- a/test/malformed-restore.test
+++ b/test/malformed-restore.test
@@ -1,7 +1,7 @@
Test for malformed input to --restore
https://savannah.nongnu.org/bugs/index.php?28185
- $ cp malformed-restore-double-owner.acl tmp.acl
+ $ cp "%TESTDIR/malformed-restore-double-owner.acl" tmp.acl
$ sed -i "s/USER/%TUSER/g" tmp.acl
$ sed -i "s/GROUP/%TGROUP/g" tmp.acl
$ touch tmp
diff --git a/test/run b/test/run
index 2cf52e8..0a12be6 100755
--- a/test/run
+++ b/test/run
@@ -37,7 +37,10 @@
#
use strict;
+use Cwd qw(abs_path);
use FileHandle;
+use File::Basename qw(basename dirname);
+use File::Path qw(rmtree);
use Getopt::Std;
use POSIX qw(isatty setuid getcwd);
use vars qw($opt_l $opt_v);
@@ -53,9 +56,28 @@ if (isatty(fileno(STDOUT))) {
$FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
}
+# Export this dir to tests so they can access data files if needed.
+$ENV{"TESTDIR"} = abs_path(dirname($0));
+# Add the current dir to PATH so we can find sort-getfattr-output and such.
+$ENV{"PATH"} = $ENV{"TESTDIR"} . ":$ENV{PATH}";
+# Add the parent dir to PATH so we can find the compiled tools.
+$ENV{"PATH"} = dirname(abs_path(dirname($0))) . ":$ENV{PATH}";
$ENV{"TUSER"} = getpwuid($>);
$ENV{"TGROUP"} = getgrgid($));
+open(TEST_FILE, $ARGV[0]);
+
+# Create a tempdir to run in for parallel test execution.
+my $tmpdir = $ARGV[0] . ".dir";
+rmtree($tmpdir);
+if (!mkdir($tmpdir)) {
+ $tmpdir = getcwd() . "/" . basename($ARGV[0]) . ".dir";
+ rmtree($tmpdir);
+ mkdir($tmpdir) or die "could not create $tmpdir";
+}
+my $pretmpdir = getcwd();
+chdir($tmpdir) or die "could not enter $tmpdir";
+
sub exec_test($$);
sub process_test($$$$);
@@ -66,7 +88,7 @@ my $lineno;
my $width = ($ENV{COLUMNS} || 80) >> 1;
for (;;) {
- my $line = <>; $lineno++;
+ my $line = <TEST_FILE>; $lineno++;
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
$line =~ s[%(\w+)][$ENV{$1}]eg;
@@ -106,6 +128,11 @@ if (isatty(fileno(STDOUT))) {
}
}
print $status, "\n";
+
+# Now clean up the testdir.
+chdir($pretmpdir);
+rmtree($tmpdir);
+
exit $failed ? 1 : 0;
--
2.5.2

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,41 @@
From 3d6d241eb1931d7f0be5a755c4c04daac0fde6bb Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 18 Jan 2014 23:11:23 -0500
Subject: [PATCH 15/34] build: drop aclincludedir, use pkgincludedir
Automake already provides a variable for
${includedir}/${PACKAGE_NAME}; use it.
---
Makefile.am | 3 +--
include/Makemodule.am | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 40d6ae5..915ab2a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,10 +10,9 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\"
-aclincludedir = $(includedir)/acl
sysincludedir = $(includedir)/sys
-aclinclude_HEADERS =
+pkginclude_HEADERS =
sysinclude_HEADERS =
bin_PROGRAMS =
lib_LTLIBRARIES =
diff --git a/include/Makemodule.am b/include/Makemodule.am
index 2596f5e..37364d3 100644
--- a/include/Makemodule.am
+++ b/include/Makemodule.am
@@ -1,4 +1,4 @@
-aclinclude_HEADERS += \
+pkginclude_HEADERS += \
include/libacl.h
sysinclude_HEADERS += \
--
2.5.2

View file

@ -0,0 +1,56 @@
From 3ae49e0a0b4bf22f137ec9a85f147815c972fdf0 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 18 Jan 2014 23:21:58 -0500
Subject: [PATCH 16/34] build: make use of an aux-dir to stow away helper
scripts
---
.gitignore | 15 ++-------------
configure.ac | 2 +-
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index d907d15..307fbe9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,22 +17,11 @@
/ABOUT-NLS
/aclocal.m4
/autom4te.cache/
-/ar-lib
-/config.cache
-/config.guess
-/config.log
-/config.rpath
-/config.status
-/config.sub
+/build-aux/
+/config.*
/configure
-/compile
-/depcomp
-/install-sh
/libtool
-/ltmain.sh
/m4/
-/missing
-/test-driver
Makefile
Makefile.in
stamp-h1
diff --git a/configure.ac b/configure.ac
index 1ca2a3c..27ea05d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
#
AC_INIT([acl], [2.2.53], [acl-devel@nongnu.org])
-AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([include/config.h])
AC_PREFIX_DEFAULT(/usr)
--
2.5.2

View file

@ -0,0 +1,71 @@
From 90742e38c6b932d3c8182785f164c9ca282ea57e Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 18 Jan 2014 23:28:14 -0500
Subject: [PATCH 17/34] build: ship a pkgconfig file for libacl
---
.gitignore | 1 +
Makefile.am | 2 ++
configure.ac | 1 +
libacl.pc.in | 10 ++++++++++
4 files changed, 14 insertions(+)
create mode 100644 libacl.pc.in
diff --git a/.gitignore b/.gitignore
index 307fbe9..7a19031 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
*.lo
*.mo
*.o
+*.pc
.dirstamp
.deps/
.libs/
diff --git a/Makefile.am b/Makefile.am
index 915ab2a..47d2a4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,8 +10,10 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\"
+pkgconfdir = $(libdir)/pkgconfig
sysincludedir = $(includedir)/sys
+pkgconf_DATA = libacl.pc
pkginclude_HEADERS =
sysinclude_HEADERS =
bin_PROGRAMS =
diff --git a/configure.ac b/configure.ac
index 27ea05d..2182e81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,7 @@ AC_CONFIG_COMMANDS([include/sys],
$as_ln_s "$ac_abs_top_srcdir/include" include/sys
])
AC_CONFIG_FILES([
+ libacl.pc
Makefile
po/Makefile.in
])
diff --git a/libacl.pc.in b/libacl.pc.in
new file mode 100644
index 0000000..707a887
--- /dev/null
+++ b/libacl.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libacl
+Description: A library for POSIX Access Control Lists
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lacl
--
2.5.2

View file

@ -0,0 +1,128 @@
From 3d615724df45f9d7b3438ce7aa2d4f1704aad7d1 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 19 Jan 2014 00:35:13 -0500
Subject: [PATCH 18/34] read_acl_{comments,seq}: rename "line" to "lineno"
The word "line" is used to refer to the content of a line, and a few
places are already using "lineno". Change all to "lineno" so that we
can use "line" consistently.
---
tools/parse.c | 14 +++++++-------
tools/parse.h | 4 ++--
tools/setfacl.c | 10 +++++-----
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/tools/parse.c b/tools/parse.c
index e7e6add..6f30cf5 100644
--- a/tools/parse.c
+++ b/tools/parse.c
@@ -407,7 +407,7 @@ fail:
int
read_acl_comments(
FILE *file,
- int *line,
+ int *lineno,
char **path_p,
uid_t *uid_p,
gid_t *gid_p,
@@ -439,15 +439,15 @@ read_acl_comments(
break;
if (c==' ' || c=='\t' || c=='\r' || c=='\n') {
if (c=='\n')
- (*line)++;
+ (*lineno)++;
continue;
}
if (c != '#') {
ungetc(c, file);
break;
}
- if (line)
- (*line)++;
+ if (lineno)
+ (*lineno)++;
if (fgets(linebuf, sizeof(linebuf), file) == NULL)
break;
@@ -539,7 +539,7 @@ read_acl_seq(
seq_t seq,
int seq_cmd,
int parse_mode,
- int *line,
+ int *lineno,
int *which)
{
char linebuf[1024];
@@ -552,8 +552,8 @@ read_acl_seq(
for(;;) {
if (fgets(linebuf, sizeof(linebuf), file) == NULL)
break;
- if (line)
- (*line)++;
+ if (lineno)
+ (*lineno)++;
cp = linebuf;
SKIP_WS(cp);
diff --git a/tools/parse.h b/tools/parse.h
index b2e68b4..2549753 100644
--- a/tools/parse.h
+++ b/tools/parse.h
@@ -61,7 +61,7 @@ parse_acl_seq(
int
read_acl_comments(
FILE *file,
- int *line,
+ int *lineno,
char **path_p,
uid_t *uid_p,
gid_t *gid_p,
@@ -72,7 +72,7 @@ read_acl_seq(
seq_t seq,
int seq_cmd,
int parse_mode,
- int *line,
+ int *lineno,
int *which);
diff --git a/tools/setfacl.c b/tools/setfacl.c
index f6135b7..b0ddedf 100644
--- a/tools/setfacl.c
+++ b/tools/setfacl.c
@@ -125,15 +125,15 @@ restore(
gid_t gid;
mode_t mask, flags;
struct do_set_args args = { };
- int line = 0, backup_line;
+ int lineno = 0, backup_line;
int error, status = 0;
int chmod_required = 0;
memset(&st, 0, sizeof(st));
for(;;) {
- backup_line = line;
- error = read_acl_comments(file, &line, &path_p, &uid, &gid,
+ backup_line = lineno;
+ error = read_acl_comments(file, &lineno, &path_p, &uid, &gid,
&flags);
if (error < 0) {
error = -error;
@@ -168,11 +168,11 @@ restore(
SEQ_PARSE_WITH_PERM |
SEQ_PARSE_DEFAULT |
SEQ_PARSE_MULTI,
- &line, NULL);
+ &lineno, NULL);
if (error != 0) {
fprintf(stderr, _("%s: %s: %s in line %d\n"),
progname, xquote(filename, "\n\r"), strerror(errno),
- line);
+ lineno);
status = 1;
goto getout;
}
--
2.5.2

View file

@ -0,0 +1,89 @@
From 34d5069ab4187aece1b711a86af705ff121ac62d Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 19 Jan 2014 01:05:11 -0500
Subject: [PATCH 19/34] read_acl_{comments,seq}: switch to next_line
Rather than use a fixed length buffer, use next_line. This let's us
handle any arbitrary length and avoid the non-portable PATH_MAX.
Fixes bug 27388 in the acl tracker.
---
tools/parse.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/tools/parse.c b/tools/parse.c
index 6f30cf5..df69c26 100644
--- a/tools/parse.c
+++ b/tools/parse.c
@@ -419,9 +419,7 @@ read_acl_comments(
bytes for "# file: ". Not a good solution but for now it is the
best I can do without too much impact on the code. [tw]
*/
- char linebuf[(4*PATH_MAX)+9];
- char *cp;
- char *p;
+ char *line, *cp, *p;
int comments_read = 0;
if (path_p)
@@ -449,19 +447,20 @@ read_acl_comments(
if (lineno)
(*lineno)++;
- if (fgets(linebuf, sizeof(linebuf), file) == NULL)
+ line = next_line(file);
+ if (line == NULL)
break;
comments_read = 1;
- p = strrchr(linebuf, '\0');
- while (p > linebuf &&
+ p = strrchr(line, '\0');
+ while (p > line &&
(*(p-1)=='\r' || *(p-1)=='\n')) {
p--;
*p = '\0';
}
- cp = linebuf;
+ cp = line;
SKIP_WS(cp);
if (strncmp(cp, "file:", 5) == 0) {
cp += 5;
@@ -542,20 +541,18 @@ read_acl_seq(
int *lineno,
int *which)
{
- char linebuf[1024];
+ char *line;
const char *cp;
cmd_t cmd;
if (which)
*which = -1;
- for(;;) {
- if (fgets(linebuf, sizeof(linebuf), file) == NULL)
- break;
+ while ((line = next_line(file))) {
if (lineno)
(*lineno)++;
- cp = linebuf;
+ cp = line;
SKIP_WS(cp);
if (*cp == '\0') {
if (!(parse_mode & SEQ_PARSE_MULTI))
@@ -588,7 +585,7 @@ read_acl_seq(
fail:
if (which)
- *which = (cp - linebuf);
+ *which = (cp - line);
return -1;
}
--
2.5.2

View file

@ -0,0 +1,27 @@
From f2a5f57a20ffa007abc1fa24df1f76e18b74a425 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
Date: Tue, 10 Jun 2014 14:34:50 -0400
Subject: [PATCH 20/34] telldir return value and seekdir second parameters are
of type long
not off_t .. since a pretty long time.
---
libmisc/walk_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
index 2be9d47..a93a662 100644
--- a/libmisc/walk_tree.c
+++ b/libmisc/walk_tree.c
@@ -34,7 +34,7 @@ struct entry_handle {
dev_t dev;
ino_t ino;
DIR *stream;
- off_t pos;
+ long pos;
};
struct entry_handle head = {
--
2.5.2

View file

@ -0,0 +1,65 @@
From 809584283a3ce5b0250656faefb23a821782adbe Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 12 Aug 2014 08:32:26 -0400
Subject: [PATCH 21/34] mark libmisc funcs as hidden so they are not exported
---
include/misc.h | 17 +++++++++++++----
libacl/libobj.h | 9 +--------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/include/misc.h b/include/misc.h
index a4fa70e..f5c0dae 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -18,14 +18,23 @@
#ifndef __MISC_H
#define __MISC_H
+#include "config.h"
+
#include <stdio.h>
-extern int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
+/* Mark library internal functions as hidden */
+#if defined(HAVE_VISIBILITY_ATTRIBUTE)
+# define hidden __attribute__((visibility("hidden")))
+#else
+# define hidden /* hidden */
+#endif
+
+hidden int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
-extern const char *quote(const char *str, const char *quote_chars);
-extern char *unquote(char *str);
+hidden const char *quote(const char *str, const char *quote_chars);
+hidden char *unquote(char *str);
-extern char *next_line(FILE *file);
+hidden char *next_line(FILE *file);
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/libacl/libobj.h b/libacl/libobj.h
index 5480a0e..c41d5f9 100644
--- a/libacl/libobj.h
+++ b/libacl/libobj.h
@@ -20,14 +20,7 @@
#include <stdlib.h>
-#include "config.h"
-
-/* Mark library internal functions as hidden */
-#if defined(HAVE_VISIBILITY_ATTRIBUTE)
-# define hidden __attribute__((visibility("hidden")))
-#else
-# define hidden /* hidden */
-#endif
+#include "misc.h"
/* Ugly pointer manipulation */
--
2.5.2

View file

@ -0,0 +1,309 @@
From a2c4d71c2e84419a49db503ed59de4d3d1dca7dd Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 12 Aug 2014 08:37:25 -0400
Subject: [PATCH 22/34] add __acl_ prefixes to internal symbols
When static linking libacl, people sometimes run into symbol collisions
because their own code defines symbols like "quote". So for acl internal
symbols, use an __acl_ prefix.
---
exports | 12 ++----------
include/misc.h | 8 ++++----
libacl/__acl_to_any_text.c | 4 ++--
libacl/acl_from_text.c | 4 ++--
libmisc/high_water_alloc.c | 2 +-
libmisc/next_line.c | 6 +++---
libmisc/quote.c | 4 ++--
libmisc/unquote.c | 2 +-
tools/getfacl.c | 4 ++--
tools/parse.c | 14 +++++++-------
tools/setfacl.c | 4 ++--
11 files changed, 28 insertions(+), 36 deletions(-)
diff --git a/exports b/exports
index 7d8e69e..bf15d84 100644
--- a/exports
+++ b/exports
@@ -59,22 +59,14 @@ ACL_1.0 {
acl_to_any_text;
local:
- # Library internal stuff
+ # Library internal stuff
__new_var_obj_p;
__new_obj_p_here;
__free_obj_p;
__check_obj_p;
__ext2int_and_check;
- __acl_reorder_entry_obj_p;
- __acl_reorder_obj_p;
- __acl_init_obj;
- __acl_create_entry_obj;
- __acl_free_acl_obj;
- __acl_to_any_text;
+ __acl_*;
__apply_mask_to_mode;
-
- quote;
- unquote;
};
ACL_1.1 {
diff --git a/include/misc.h b/include/misc.h
index f5c0dae..24b65d2 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -29,12 +29,12 @@
# define hidden /* hidden */
#endif
-hidden int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
+hidden int __acl_high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
-hidden const char *quote(const char *str, const char *quote_chars);
-hidden char *unquote(char *str);
+hidden const char *__acl_quote(const char *str, const char *quote_chars);
+hidden char *__acl_unquote(char *str);
-hidden char *next_line(FILE *file);
+hidden char *__acl_next_line(FILE *file);
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/libacl/__acl_to_any_text.c b/libacl/__acl_to_any_text.c
index 1d10e81..de3925e 100644
--- a/libacl/__acl_to_any_text.c
+++ b/libacl/__acl_to_any_text.c
@@ -159,7 +159,7 @@ acl_entry_to_any_str(const acl_entry_t entry_d, char *text_p, ssize_t size,
if (options & TEXT_NUMERIC_IDS)
str = NULL;
else
- str = quote(user_name(
+ str = __acl_quote(user_name(
entry_obj_p->eid.qid), ":, \t\n\r");
if (str != NULL) {
strncpy(text_p, str, size);
@@ -182,7 +182,7 @@ acl_entry_to_any_str(const acl_entry_t entry_d, char *text_p, ssize_t size,
if (options & TEXT_NUMERIC_IDS)
str = NULL;
else
- str = quote(group_name(
+ str = __acl_quote(group_name(
entry_obj_p->eid.qid), ":, \t\n\r");
if (str != NULL) {
strncpy(text_p, str, size);
diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c
index c08bd3b..83a4d21 100644
--- a/libacl/acl_from_text.c
+++ b/libacl/acl_from_text.c
@@ -212,7 +212,7 @@ parse_acl_entry(const char **text_p, acl_t *acl_p)
str = get_token(text_p);
if (str) {
entry_obj.etag = ACL_USER;
- error = get_uid(unquote(str),
+ error = get_uid(__acl_unquote(str),
&entry_obj.eid.qid);
free(str);
if (error) {
@@ -231,7 +231,7 @@ parse_acl_entry(const char **text_p, acl_t *acl_p)
str = get_token(text_p);
if (str) {
entry_obj.etag = ACL_GROUP;
- error = get_gid(unquote(str),
+ error = get_gid(__acl_unquote(str),
&entry_obj.eid.qid);
free(str);
if (error) {
diff --git a/libmisc/high_water_alloc.c b/libmisc/high_water_alloc.c
index c127dc1..951f4bb 100644
--- a/libmisc/high_water_alloc.c
+++ b/libmisc/high_water_alloc.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include "misc.h"
-int high_water_alloc(void **buf, size_t *bufsize, size_t newsize)
+int __acl_high_water_alloc(void **buf, size_t *bufsize, size_t newsize)
{
#define CHUNK_SIZE 256
/*
diff --git a/libmisc/next_line.c b/libmisc/next_line.c
index 0566d7a..126a364 100644
--- a/libmisc/next_line.c
+++ b/libmisc/next_line.c
@@ -23,7 +23,7 @@
#define LINE_SIZE getpagesize()
-char *next_line(FILE *file)
+char *__acl_next_line(FILE *file)
{
static char *line;
static size_t line_size;
@@ -31,7 +31,7 @@ char *next_line(FILE *file)
int eol = 0;
if (!line) {
- if (high_water_alloc((void **)&line, &line_size, LINE_SIZE))
+ if (__acl_high_water_alloc((void **)&line, &line_size, LINE_SIZE))
return NULL;
}
c = line;
@@ -47,7 +47,7 @@ char *next_line(FILE *file)
if (feof(file))
break;
if (!eol) {
- if (high_water_alloc((void **)&line, &line_size,
+ if (__acl_high_water_alloc((void **)&line, &line_size,
2 * line_size))
return NULL;
c = strrchr(line, '\0');
diff --git a/libmisc/quote.c b/libmisc/quote.c
index bf8f9eb..a28800c 100644
--- a/libmisc/quote.c
+++ b/libmisc/quote.c
@@ -23,7 +23,7 @@
#include <string.h>
#include "misc.h"
-const char *quote(const char *str, const char *quote_chars)
+const char *__acl_quote(const char *str, const char *quote_chars)
{
static char *quoted_str;
static size_t quoted_str_len;
@@ -40,7 +40,7 @@ const char *quote(const char *str, const char *quote_chars)
if (nonpr == 0)
return str;
- if (high_water_alloc((void **)&quoted_str, &quoted_str_len,
+ if (__acl_high_water_alloc((void **)&quoted_str, &quoted_str_len,
(s - (unsigned char *)str) + nonpr * 3 + 1))
return NULL;
for (s = (unsigned char *)str, q = quoted_str; *s != '\0'; s++) {
diff --git a/libmisc/unquote.c b/libmisc/unquote.c
index bffebf9..4f4ce7c 100644
--- a/libmisc/unquote.c
+++ b/libmisc/unquote.c
@@ -22,7 +22,7 @@
#include <ctype.h>
#include "misc.h"
-char *unquote(char *str)
+char *__acl_unquote(char *str)
{
unsigned char *s, *t;
diff --git a/tools/getfacl.c b/tools/getfacl.c
index 22cc1c7..679affa 100644
--- a/tools/getfacl.c
+++ b/tools/getfacl.c
@@ -89,7 +89,7 @@ int opt_numeric; /* don't convert id's to symbolic names */
static const char *xquote(const char *str, const char *quote_chars)
{
- const char *q = quote(str, quote_chars);
+ const char *q = __acl_quote(str, quote_chars);
if (q == NULL) {
fprintf(stderr, "%s: %s\n", progname, strerror(errno));
exit(1);
@@ -717,7 +717,7 @@ int main(int argc, char *argv[])
do {
if (optind == argc ||
strcmp(argv[optind], "-") == 0) {
- while ((line = next_line(stdin)) != NULL) {
+ while ((line = __acl_next_line(stdin)) != NULL) {
if (*line == '\0')
continue;
diff --git a/tools/parse.c b/tools/parse.c
index df69c26..823bfeb 100644
--- a/tools/parse.c
+++ b/tools/parse.c
@@ -226,7 +226,7 @@ user_entry:
str = get_token(text_p);
if (str) {
cmd->c_tag = ACL_USER;
- error = get_uid(unquote(str), &cmd->c_id);
+ error = get_uid(__acl_unquote(str), &cmd->c_id);
free(str);
if (error) {
*text_p = backup;
@@ -245,7 +245,7 @@ user_entry:
str = get_token(text_p);
if (str) {
cmd->c_tag = ACL_GROUP;
- error = get_gid(unquote(str), &cmd->c_id);
+ error = get_gid(__acl_unquote(str), &cmd->c_id);
free(str);
if (error) {
*text_p = backup;
@@ -447,7 +447,7 @@ read_acl_comments(
if (lineno)
(*lineno)++;
- line = next_line(file);
+ line = __acl_next_line(file);
if (line == NULL)
break;
@@ -465,7 +465,7 @@ read_acl_comments(
if (strncmp(cp, "file:", 5) == 0) {
cp += 5;
SKIP_WS(cp);
- cp = unquote(cp);
+ cp = __acl_unquote(cp);
if (path_p) {
if (*path_p)
@@ -482,7 +482,7 @@ read_acl_comments(
if (uid_p) {
if (*uid_p != ACL_UNDEFINED_ID)
goto fail;
- if (get_uid(unquote(cp), uid_p) != 0)
+ if (get_uid(__acl_unquote(cp), uid_p) != 0)
continue;
}
} else if (strncmp(cp, "group:", 6) == 0) {
@@ -492,7 +492,7 @@ read_acl_comments(
if (gid_p) {
if (*gid_p != ACL_UNDEFINED_ID)
goto fail;
- if (get_gid(unquote(cp), gid_p) != 0)
+ if (get_gid(__acl_unquote(cp), gid_p) != 0)
continue;
}
} else if (strncmp(cp, "flags:", 6) == 0) {
@@ -548,7 +548,7 @@ read_acl_seq(
if (which)
*which = -1;
- while ((line = next_line(file))) {
+ while ((line = __acl_next_line(file))) {
if (lineno)
(*lineno)++;
diff --git a/tools/setfacl.c b/tools/setfacl.c
index b0ddedf..880bd1e 100644
--- a/tools/setfacl.c
+++ b/tools/setfacl.c
@@ -91,7 +91,7 @@ int promote_warning;
static const char *xquote(const char *str, const char *quote_chars)
{
- const char *q = quote(str, quote_chars);
+ const char *q = __acl_quote(str, quote_chars);
if (q == NULL) {
fprintf(stderr, "%s: %s\n", progname, strerror(errno));
exit(1);
@@ -310,7 +310,7 @@ int next_file(const char *arg, seq_t seq)
args.seq = seq;
if (strcmp(arg, "-") == 0) {
- while ((line = next_line(stdin)))
+ while ((line = __acl_next_line(stdin)))
errors = walk_tree(line, walk_flags, 0, do_set, &args);
if (!feof(stdin)) {
fprintf(stderr, _("%s: Standard input: %s\n"),
--
2.5.2

View file

@ -0,0 +1,29 @@
From 62ce6354ef5a8eb5644908748f79c8cd18474d4c Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruen@linbit.com>
Date: Wed, 13 Aug 2014 01:25:12 +0200
Subject: [PATCH 23/34] cp.test: Check permissions of the right file
After "cp -p", the cp.test case was checking the permissions
of the source file instead of the target file.
Reported by: Nic <nic.henke@versity.com>
---
test/cp.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/cp.test b/test/cp.test
index a927195..449e2eb 100644
--- a/test/cp.test
+++ b/test/cp.test
@@ -14,7 +14,7 @@ The cp utility should only copy ACLs if `-p' is given.
$ rm g
$ cp -p f g
- $ ls -l f | awk -- '{ print $1 }'
+ $ ls -l g | awk -- '{ print $1 }'
> -rw-rw-r--+
$ mkdir h
--
2.5.2

View file

@ -0,0 +1,42 @@
From 124e431e677f5ed3c45f71105a6770ceb96199dd Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Mon, 13 Apr 2015 11:56:05 +0200
Subject: [PATCH 24/34] libacl: acl_set_file: Remove unnecesary racy check
Only directories can have default acls. This is checked in the kernel, and
unnecessarily also in acl_set_file. There is a window between checking the file
type and setting the acl, so the check in acl_set_file isn't even safe. Remove
it.
Reported by Lennart Poettering <lpoetter@redhat.com>.
---
libacl/acl_set_file.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/libacl/acl_set_file.c b/libacl/acl_set_file.c
index 6821851..a7e368f 100644
--- a/libacl/acl_set_file.c
+++ b/libacl/acl_set_file.c
@@ -54,19 +54,6 @@ acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
return -1;
}
- if (type == ACL_TYPE_DEFAULT) {
- struct stat st;
-
- if (stat(path_p, &st) != 0)
- return -1;
-
- /* Only directories may have default ACLs. */
- if (!S_ISDIR(st.st_mode)) {
- errno = EACCES;
- return -1;
- }
- }
-
ext_acl_p = __acl_to_xattr(acl_obj_p, &size);
if (!ext_acl_p)
return -1;
--
2.5.2

View file

@ -0,0 +1,236 @@
From 79f563779b9b9ba89cc2352d70e3cdf27acff513 Mon Sep 17 00:00:00 2001
From: Brice De Bruyne <bricedb@gmail.com>
Date: Mon, 27 Apr 2015 14:57:56 +0200
Subject: [PATCH 25/34] fix compilation with latest xattr git
The attr package has <attr/xattr.h> removed, but acl has not been adapted yet.
I took the liberty to cook up this patch that includes <sys/xattr.h> instead of
<attr/xattr.h> in affected c files and I added errno.h plus a define of ENOATTR
to c files where needed.
I also removed the AC_PACKAGE_NEED_ATTR_XATTR_H definition from
package_attrdev.m4, and changed configure to skip this test.
Further changes by Andreas: Move the ENOATTR check into libacl.h.
---
configure.ac | 1 -
libacl/__acl_extended_file.c | 3 +--
libacl/acl_delete_def_file.c | 4 ++--
libacl/acl_extended_fd.c | 3 +--
libacl/acl_extended_file.c | 2 +-
libacl/acl_extended_file_nofollow.c | 2 +-
libacl/acl_get_fd.c | 3 +--
libacl/acl_get_file.c | 3 +--
libacl/acl_set_fd.c | 2 +-
libacl/acl_set_file.c | 2 +-
libacl/libacl.h | 5 +++++
m4/package_attrdev.m4 | 11 -----------
12 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2182e81..cd3c680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,6 @@ dnl Automatically increment the revision for every release.
LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
AC_SUBST(LT_REVISION)
-AC_PACKAGE_NEED_ATTR_XATTR_H
AC_PACKAGE_NEED_ATTR_ERROR_H
AC_PACKAGE_NEED_GETXATTR_LIBATTR
diff --git a/libacl/__acl_extended_file.c b/libacl/__acl_extended_file.c
index 3e45abd..c81dc8f 100644
--- a/libacl/__acl_extended_file.c
+++ b/libacl/__acl_extended_file.c
@@ -20,14 +20,13 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "byteorder.h"
#include "acl_ea.h"
#include "__acl_extended_file.h"
-
int
__acl_extended_file(const char *path_p,
ssize_t (*fun)(const char *, const char *,
diff --git a/libacl/acl_delete_def_file.c b/libacl/acl_delete_def_file.c
index fae4460..845940c 100644
--- a/libacl/acl_delete_def_file.c
+++ b/libacl/acl_delete_def_file.c
@@ -20,11 +20,11 @@
*/
#include <sys/types.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "byteorder.h"
#include "acl_ea.h"
#include "config.h"
-
+#include "libacl.h"
/* 23.4.8 */
int
diff --git a/libacl/acl_extended_fd.c b/libacl/acl_extended_fd.c
index f19ad7b..bbf9055 100644
--- a/libacl/acl_extended_fd.c
+++ b/libacl/acl_extended_fd.c
@@ -20,13 +20,12 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "byteorder.h"
#include "acl_ea.h"
-
int
acl_extended_fd(int fd)
{
diff --git a/libacl/acl_extended_file.c b/libacl/acl_extended_file.c
index f417784..87f8e6e 100644
--- a/libacl/acl_extended_file.c
+++ b/libacl/acl_extended_file.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_extended_file.h"
diff --git a/libacl/acl_extended_file_nofollow.c b/libacl/acl_extended_file_nofollow.c
index c253e4d..a15b076 100644
--- a/libacl/acl_extended_file_nofollow.c
+++ b/libacl/acl_extended_file_nofollow.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_extended_file.h"
diff --git a/libacl/acl_get_fd.c b/libacl/acl_get_fd.c
index f2525ef..15e3880 100644
--- a/libacl/acl_get_fd.c
+++ b/libacl/acl_get_fd.c
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <acl/libacl.h>
#include "libacl.h"
#include "__acl_from_xattr.h"
@@ -31,7 +31,6 @@
#include "byteorder.h"
#include "acl_ea.h"
-
/* 23.4.15 */
acl_t
acl_get_fd(int fd)
diff --git a/libacl/acl_get_file.c b/libacl/acl_get_file.c
index 110ef2e..d3131bc 100644
--- a/libacl/acl_get_file.c
+++ b/libacl/acl_get_file.c
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <acl/libacl.h>
#include "libacl.h"
#include "__acl_from_xattr.h"
@@ -31,7 +31,6 @@
#include "byteorder.h"
#include "acl_ea.h"
-
/* 23.4.16 */
acl_t
acl_get_file(const char *path_p, acl_type_t type)
diff --git a/libacl/acl_set_fd.c b/libacl/acl_set_fd.c
index e6413ad..38dcd4a 100644
--- a/libacl/acl_set_fd.c
+++ b/libacl/acl_set_fd.c
@@ -20,7 +20,7 @@
*/
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_to_xattr.h"
diff --git a/libacl/acl_set_file.c b/libacl/acl_set_file.c
index a7e368f..c234b4a 100644
--- a/libacl/acl_set_file.c
+++ b/libacl/acl_set_file.c
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "libacl.h"
#include "__acl_to_xattr.h"
diff --git a/libacl/libacl.h b/libacl/libacl.h
index e79575d..08ba905 100644
--- a/libacl/libacl.h
+++ b/libacl/libacl.h
@@ -17,8 +17,13 @@
#include <errno.h>
#include <sys/acl.h>
+#include <errno.h>
#include "libobj.h"
+#ifndef ENOATTR
+# define ENOATTR ENODATA
+#endif
+
typedef unsigned int permset_t;
#define ACL_PERM_NONE (0x0000)
diff --git a/m4/package_attrdev.m4 b/m4/package_attrdev.m4
index 92c9135..1891bb2 100644
--- a/m4/package_attrdev.m4
+++ b/m4/package_attrdev.m4
@@ -12,17 +12,6 @@ dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
- [ AC_CHECK_HEADERS([attr/xattr.h])
- if test "$ac_cv_header_attr_xattr_h" != "yes"; then
- echo
- echo 'FATAL ERROR: attr/xattr.h does not exist.'
- echo 'Install the extended attributes (attr) development package.'
- echo 'Alternatively, run "make install-dev" from the attr source.'
- exit 1
- fi
- ])
-
AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
[ AC_CHECK_HEADERS([attr/error_context.h])
if test "$ac_cv_header_attr_error_context_h" != "yes"; then
--
2.5.2

View file

@ -0,0 +1,28 @@
From 5d8de21bef5ee62ebca93ae81515b6065626e559 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Thu, 16 Jul 2015 14:04:20 +0200
Subject: [PATCH 26/34] getfacl: Fix memory leak
Reported by Andreas Stieger <astieger@suse.com>
(https://bugzilla.suse.com/show_bug.cgi?id=929108): Fix a memory leak in
getfacl (allocated acl not being freed).
---
tools/getfacl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/getfacl.c b/tools/getfacl.c
index 679affa..e44b572 100644
--- a/tools/getfacl.c
+++ b/tools/getfacl.c
@@ -477,7 +477,7 @@ int do_print(const char *path_p, const struct stat *st, int walk_flags, void *un
if (opt_skip_base &&
(!acl || acl_equiv_mode(acl, NULL) == 0) && !default_acl)
- return 0;
+ goto cleanup;
if (opt_print_acl && opt_print_default_acl)
default_prefix = "default:";
--
2.5.2

View file

@ -0,0 +1,31 @@
From 226e93f4d17b68f4cca02fb7b34f22fd9a7ab237 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Wed, 26 Aug 2015 12:16:38 +0200
Subject: [PATCH 27/34] Fix the display block nesting in acl.5
---
man/man5/acl.5 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/man5/acl.5 b/man/man5/acl.5
index 1e44a31..c045726 100644
--- a/man/man5/acl.5
+++ b/man/man5/acl.5
@@ -217,12 +217,12 @@ access is denied.
.Sy if
the ACL_GROUP_OBJ entry contains the requested permissions,
access is granted,
-.Ed
.Pp
.Sy else
access is denied.
-.Pp
.Ed
+.Ed
+.Pp
.It
.Sy else if
the ACL_OTHER entry contains the requested permissions, access is granted.
--
2.5.2

View file

@ -0,0 +1,50 @@
From f05131d8d16751dbb586058fabc8cb404dec23a2 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Tue, 1 Sep 2015 22:37:17 +0200
Subject: [PATCH 28/34] setfacl man page: Minor wording improvements
---
man/man1/setfacl.1 | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/man/man1/setfacl.1 b/man/man1/setfacl.1
index 0c7c046..a73d122 100644
--- a/man/man1/setfacl.1
+++ b/man/man1/setfacl.1
@@ -37,17 +37,17 @@ This utility sets Access Control Lists (ACLs) of files and directories.
On the command line, a sequence of commands is followed by a sequence of
files (which in turn can be followed by another sequence of commands, ...).
-The options
-.I \-m,
+The
+.I \-m
and
.I \-x
-expect an ACL on the command line. Multiple ACL entries are separated
-by comma characters (`,'). The options
-.I \-M,
+options expect an ACL on the command line. Multiple ACL entries are separated
+by comma characters (`,'). The
+.I \-M
and
.I \-X
-read an ACL from a file or from standard input. The ACL entry format is described in Section
-ACL ENTRIES.
+options read an ACL from a file or from standard input. The ACL entry format is
+described in Section ACL ENTRIES.
The
.IR "\-\-set" " and " "\-\-set-file"
@@ -68,7 +68,7 @@ does not exist. Only ACL entries without the
field are accepted as parameters, unless POSIXLY_CORRECT is defined.
When reading from files using the
-.I \-M,
+.I \-M
and
.IR \-X
options, setfacl accepts the output getfacl produces.
--
2.5.2

View file

@ -0,0 +1,85 @@
From 519e3932898baba1e7eeb0d9d89acee796da61f5 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruenba@redhat.com>
Date: Tue, 8 Sep 2015 14:23:58 +0200
Subject: [PATCH 29/34] getfacl: Fix minor resource leak
The return value of of acl_get_qualifier needs to be acl_freed.
Reported by Jaska Uimonen <jaska.uimonen@helsinki.fi>.
---
tools/getfacl.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/tools/getfacl.c b/tools/getfacl.c
index e44b572..3d8f1b8 100644
--- a/tools/getfacl.c
+++ b/tools/getfacl.c
@@ -125,7 +125,7 @@ struct name_list *get_list(const struct stat *st, acl_t acl)
return NULL;
while (ret > 0) {
acl_tag_t e_type;
- const id_t *id_p;
+ id_t *id_p;
const char *name = "";
int len;
@@ -137,8 +137,10 @@ struct name_list *get_list(const struct stat *st, acl_t acl)
case ACL_USER:
id_p = acl_get_qualifier(ent);
- if (id_p != NULL)
+ if (id_p != NULL) {
name = user_name(*id_p, opt_numeric);
+ acl_free(id_p);
+ }
break;
case ACL_GROUP_OBJ:
@@ -147,8 +149,10 @@ struct name_list *get_list(const struct stat *st, acl_t acl)
case ACL_GROUP:
id_p = acl_get_qualifier(ent);
- if (id_p != NULL)
+ if (id_p != NULL) {
name = group_name(*id_p, opt_numeric);
+ acl_free(id_p);
+ }
break;
}
name = xquote(name, "\t\n\r");
@@ -378,19 +382,24 @@ int do_show(FILE *stream, const char *path_p, const struct stat *st,
continue;
} else {
if (acl_tag == ACL_USER || acl_tag == ACL_GROUP) {
- id_t *acl_id_p = NULL, *dacl_id_p = NULL;
- if (acl_ent)
- acl_id_p = acl_get_qualifier(acl_ent);
- if (dacl_ent)
- dacl_id_p = acl_get_qualifier(dacl_ent);
+ int id_cmp = 0;
+
+ if (acl_ent && dacl_ent) {
+ id_t *acl_id_p = acl_get_qualifier(acl_ent);
+ id_t *dacl_id_p = acl_get_qualifier(dacl_ent);
+
+ id_cmp = (*acl_id_p > *dacl_id_p) -
+ (*acl_id_p < *dacl_id_p);
+ acl_free(acl_id_p);
+ acl_free(dacl_id_p);
+ }
- if (acl && (!dacl || *acl_id_p < *dacl_id_p)) {
+ if (acl && (!dacl || id_cmp < 0)) {
show_line(stream, &acl_names, acl,
&acl_ent, acl_mask,
NULL, NULL, NULL, NULL);
continue;
- } else if (dacl &&
- (!acl || *dacl_id_p < *acl_id_p)) {
+ } else if (dacl && (!acl || id_cmp > 0)) {
show_line(stream, NULL, NULL, NULL,
NULL, &dacl_names, dacl,
&dacl_ent, dacl_mask);
--
2.5.2

View file

@ -0,0 +1,34 @@
From fc027ffa5eefe6d563328059348a8929c4789c17 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Tue, 15 Sep 2015 19:47:54 +0300
Subject: [PATCH 30/34] Do not export symbols that are not supposed to be
exported
As all symbols that are part of public interface are explicitly exported
with corresponding versioning, mark all remaining symbols as local.
---
exports | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/exports b/exports
index bf15d84..830a2b9 100644
--- a/exports
+++ b/exports
@@ -60,13 +60,7 @@ ACL_1.0 {
local:
# Library internal stuff
- __new_var_obj_p;
- __new_obj_p_here;
- __free_obj_p;
- __check_obj_p;
- __ext2int_and_check;
- __acl_*;
- __apply_mask_to_mode;
+ *;
};
ACL_1.1 {
--
2.5.2

View file

@ -0,0 +1,34 @@
From 4a5140636e487aeb1a8a43dbecae3ab395d31392 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Tue, 15 Sep 2015 23:03:08 +0300
Subject: [PATCH 31/34] walk_tree: mark internal variables as static
walk_tree.c internal variables should not be exposed to libmisc users.
---
libmisc/walk_tree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
index a93a662..d753dc7 100644
--- a/libmisc/walk_tree.c
+++ b/libmisc/walk_tree.c
@@ -37,13 +37,13 @@ struct entry_handle {
long pos;
};
-struct entry_handle head = {
+static struct entry_handle head = {
.next = &head,
.prev = &head,
/* The other fields are unused. */
};
-struct entry_handle *closed = &head;
-unsigned int num_dir_handles;
+static struct entry_handle *closed = &head;
+static unsigned int num_dir_handles;
static int walk_tree_visited(dev_t dev, ino_t ino)
{
--
2.5.2

View file

@ -0,0 +1,25 @@
From fa03d2475682e4ab345c9a63bd6b88117bd45f0f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 21 Sep 2015 17:07:11 -0400
Subject: [PATCH 32/34] ignore configure.lineno
Newer autoconf sometimes generates this file.
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 7a19031..71d529c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
/build-aux/
/config.*
/configure
+/configure.lineno
/libtool
/m4/
Makefile
--
2.5.2

74
acl-2.2.52-tests.patch Normal file
View file

@ -0,0 +1,74 @@
From cfd9ba83811189d9e12c86d32b06b5fd15b5f358 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 20 May 2013 13:49:34 +0200
Subject: [PATCH 1/2] make the tests ready for SELinux
---
test/root/permissions.test | 8 ++++----
test/root/restore.test | 2 +-
test/root/setfacl.test | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
Index: acl-2.2.52/test/root/permissions.test
===================================================================
--- acl-2.2.52.orig/test/root/permissions.test
+++ acl-2.2.52/test/root/permissions.test
@@ -19,7 +19,7 @@ defined permissions.
$ cd d
$ umask 027
$ touch f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
> -rw-r----- root root
@@ -39,7 +39,7 @@ Now, change the ownership of the file to
gives user bin write access.
$ chown bin:bin f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
> -rw-r----- bin bin
$ su bin
$ echo bin >> f
@@ -256,12 +256,12 @@ directories if the file has an ACL and o
$ mkdir -m 600 x
$ chown daemon:daemon x
$ echo j > x/j
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
> -rw-r----- root root
$ setfacl -m u:daemon:r x
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
> -rw-r----- root root
(With the bug this gives: `ls: x/j: Permission denied'.)
Index: acl-2.2.52/test/root/restore.test
===================================================================
--- acl-2.2.52.orig/test/root/restore.test
+++ acl-2.2.52/test/root/restore.test
@@ -21,7 +21,7 @@ Cry immediately if we are not running as
$ chown bin passwd
$ chmod u+s passwd
$ setfacl --restore passwd.acl
- $ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
+ $ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\. root/ root/'
> -rwsr-xr-x root root
$ rm passwd passwd.acl
Index: acl-2.2.52/test/root/setfacl.test
===================================================================
--- acl-2.2.52.orig/test/root/setfacl.test
+++ acl-2.2.52/test/root/setfacl.test
@@ -12,7 +12,7 @@ Cry immediately if we are not running as
$ sg bin
$ umask 027
$ touch g
- $ ls -dl g | awk '{print $1}'
+ $ ls -dl g | awk '{print $1}' | sed 's/\\.$//'
> -rw-r-----
$ setfacl -m m:- g

270
acl.changes Normal file
View file

@ -0,0 +1,270 @@
* Thu Oct 11 2018 jeffm@suse.com
- test: Add helper library to fake passwd/group files
- quote: escape literal backslashes (bsc#953659).
- Added patch:
* 0001-test-Add-helper-library-to-fake-passwd-group-files.patch
* 0002-quote-escape-literal-backslashes.patch
* Sun Sep 24 2017 coolo@suse.com
- refresh acl-2.2.52-tests.patch to work with perl 5.26
* Sat May 20 2017 dimstar@opensuse.org
- BuildRequires gettext-tools-mini instead of gettext-tools: as
acl is part of the bootstrap, we want to try to keep the dep
chain as small as possible.
* Sun Apr 23 2017 jengelh@inai.de
- Remove --with-pic that's just for static libraries.
- Replace %%__-type macro indirections.
Replace old $RPM_ by their macro equivalents for consistency.
Make the macro style consistent across the file again.
* Mon Apr 17 2017 hendrikw@arcor.de
- reenable full Larg File Support for i586
* Wed Mar 29 2017 fvogt@suse.com
- Make it possible to disable tests (for Ring0)
- Add BuildRequires: system-user-daemon for the testsuite
* Mon Mar 13 2017 kukuk@suse.de
- Add BuildRequires for system user bin needed by test suite
* Wed Dec 2 2015 jeffm@suse.com
- Update to git snapshot dated 21 Sep 2015.
- Added:
* 0001-Install-the-libraries-to-the-appropriate-directory.patch
* 0002-setfacl.1-fix-typo-inclu-de-include.patch
* 0003-test-fix-insufficient-quoting-of.patch
* 0004-Makefile-rename-configure.in-to-configure.ac.patch
* 0005-Bad-markup-in-acl.5-page.patch
* 0006-.gitignore-ignore-and-config.h.in.patch
* 0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch
* 0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch
* 0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch
* 0010-punt-debian-rpm-packaging-logic.patch
* 0011-move-gettext-logic-into-misc.h.patch
* 0012-test-make-running-parallel-out-of-tree-safe.patch
* 0013-modernize-build-system.patch
* 0014-po-regenerate-files-after-move.patch
* 0015-build-drop-aclincludedir-use-pkgincludedir.patch
* 0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch
* 0017-build-ship-a-pkgconfig-file-for-libacl.patch
* 0018-read_acl_-comments-seq-rename-line-to-lineno.patch
* 0019-read_acl_-comments-seq-switch-to-next_line.patch
* 0020-telldir-return-value-and-seekdir-second-parameters-a.patch
* 0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch
* 0022-add-__acl_-prefixes-to-internal-symbols.patch
* 0023-cp.test-Check-permissions-of-the-right-file.patch
* 0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch
* 0025-fix-compilation-with-latest-xattr-git.patch
* 0026-getfacl-Fix-memory-leak.patch
* 0027-Fix-the-display-block-nesting-in-acl.5.patch
* 0028-setfacl-man-page-Minor-wording-improvements.patch
* 0029-getfacl-Fix-minor-resource-leak.patch
* 0030-Do-not-export-symbols-that-are-not-supposed-to-be-ex.patch
* 0031-walk_tree-mark-internal-variables-as-static.patch
* 0032-ignore-configure.lineno.patch
- Signficant spec file restructuring due to 0013-modernize-build-system.patch
- removed builddefs.in.diff
* Tue Sep 23 2014 jengelh@inai.de
- Reduce size of filelist by using wildcards;
remove %%doc (some locations are always %%doc),
remove %%attr (files already have proper permissions)
* Wed Nov 13 2013 sweet_f_a@gmx.de
- add acl-2.2.52-tests.patch and enable tests, check section taken
from Fedora package
* Tue Jun 18 2013 coolo@suse.com
- remove gpg-offline calls from bootstrap package
* Sun Jun 16 2013 jengelh@inai.de
- Update to new upstream release 2.2.52
* This release fixes a few build system issues that were found and
merges in a tree walking bug fix.
- Remove acl-fiximplicit.patch (merged upstream),
config-guess-sub-update.diff (no longer applies)
- Sync baselibs.conf with in-.spec obsoletes/provides.
* Tue Mar 19 2013 meissner@suse.com
- add gpg checking
* Fri Mar 15 2013 coolo@suse.com
- use source url
* Sat Feb 2 2013 dmueller@suse.com
- Add config-guess-sub-update.diff:
update config.guess/sub to latest state for AArch64
* Wed Dec 26 2012 crrodriguez@opensuse.org
- Use OS byteswapping routines, application already Includes
"endian.h" but then goes ahead defining ad-hoc equivalent
functionality (0001-Use-OS-byteswapping-macros.patch)
* Wed May 30 2012 sweet_f_a@gmx.de
- remove useless automake deps
* Mon Feb 13 2012 coolo@suse.com
- patch license to follow spdx.org standard
* Wed Nov 30 2011 cfarrell@suse.com
- license update: GPL-2.0+;LGPL-2.1+
SPDX format
* Wed Nov 30 2011 coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
* Tue Sep 20 2011 crrodriguez@opensuse.org
- Fix provides/Obsoletes
* Fri Sep 16 2011 jengelh@medozas.de
- Implement shlib package (libacl1)
- Enable libacl-devel on all baselib arches
* Tue Apr 19 2011 bphilips@novell.com
- upgrade to 2.2.51
- Test fixes
* Sat Apr 16 2011 bphilips@novell.com
- upgrade to 2.2.50
- OPTIONS in man pages should be a section heading, not a subsection heading
- Fix a typo in the setfacl man page
- setfacl: Clarify that removing a non-existent acl entry is not an error
- Prevent setfacl --restore from SIGSEGV on malformed restore file
- setfacl: make sure that -R only calls stat(2) on symlinks when it needs to
- libacl: fix potential null pointer dereference
- setfacl: fix restore crash on malformed input
- setfacl: print useful error from read_acl_comments
- setfacl: changing owner and when S_ISUID should be set --restore fix
* Mon Jun 28 2010 jengelh@medozas.de
- use %%_smp_mflags
* Sat Dec 12 2009 jengelh@medozas.de
- add baselibs.conf as a source
- adjust baselibs.conf for SPARC
* Wed Nov 25 2009 meissner@suse.de
- readded incorrectly removed libattr-devel requires in -devel
* Mon Oct 26 2009 meissner@suse.de
- fixed implicit strchr() usage.
* Sun Sep 27 2009 crrodriguez@suse.de
- do not package static libraries
- fix -devel package dependencies
* Sat Aug 1 2009 bphilips@novell.com
- Version bump to 2.2.48
- Document the new flags comments
- Include the S_ISUID, S_ISGID, S_ISVTX flags in the getfacl output, and restore them with "setfacl --restore=file".
- Make sure that getfacl -R only calls stat(2) on symlinks when it needs to
- Stop quoting nonprintable characters in the getfacl output
- Avoid unnecessary but destructive chown calls
- Clarify license notice
* Fri Feb 13 2009 bphilips@novell.com
- fix setfacl for long utf8 filenames (rh#183181)
- Return error status on setfacl failures (rh#368451)
- getfacl/setfacl should support shortcode flags (rh#204087)
* Thu Jan 8 2009 bphilips@novell.com
- Added a number of unit test improvements
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
* Tue Nov 11 2008 ro@suse.de
- SLE-11 uses PPC64 instead of PPC, adapt baselibs.conf
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Fri Jul 11 2008 bphilips@suse.de
- Failure to recursively set/get ACLs on directories (bnc#404075)
- When invoked as ``setfacl -- ...'', setfacl segfaults (bnc#369425).
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
* Sat Oct 27 2007 agruen@suse.de
- Don't exhaust the number of file descriptors in the path walking
code, and make sure each directory is only visited once.
* Fri Oct 26 2007 agruen@suse.de
- A large jump to the current upstream version 2.2.45.
- Fix the upstream path walking code.
* Sat Mar 18 2006 agruen@suse.de
- Remove broken file /usr/lib[64]/libacl.la.
* Fri Mar 17 2006 agruen@suse.de
- Fix symlinks in the -devel package (149945, Nathan Scott).
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 13 2006 mjancar@suse.cz
- update to 2.2.34
* Tue Sep 6 2005 coolo@suse.de
- Fixing devel dependencies (the libtool check chokes on the symlinks,
but it still is right)
* Fri Aug 26 2005 agruen@suse.de
- Update to version 2.2.31: Integrate a patch we had separately;
additional stdin error handling in setfacl.
* Fri Aug 19 2005 kukuk@suse.de
- Move devel files from / to /usr
- Don't generate filelist dynamic (fix broken attr statements)
* Mon Apr 25 2005 meissner@suse.de
- Use RPM_OPT_FLAGS.
* Mon Feb 21 2005 agruen@suse.de
- Update to version 2.2.30. Several fixes.
* Thu Nov 11 2004 coolo@suse.de
- use %%find_lang
* Wed Aug 25 2004 agruen@suse.de
- #43472: Fix processing of the X pseudo permission in setfacl:
Must not modify the sequence of commands directly or else only
the first file is processed correctly, and X is not evaluated
for any other file. Add test case for X pseudo permission.
- Remove support for relative permission changes; this
non-standard feature was disabled since a while already.
- Bump version number to 2.2.25.
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Thu Jan 1 2004 agruen@suse.de
- Update to version 2.2.21. Bug fix in directory tree walking
code.
* Wed Oct 22 2003 kukuk@suse.de
- Fix provides for update case
* Thu Aug 28 2003 agruen@suse.de
- Fix a bug with error handling while walking directory trees.
* Wed Aug 27 2003 ro@suse.de
- fix patch depth in specfile
* Tue Aug 26 2003 agruen@suse.de
- Fix SIGSEGV if the quote function.
* Fri Aug 15 2003 agruen@suse.de
- Update to 2.2.15: Includes quoting of special characters in
path and user names, and several minor fixes. (For details see
doc/CHANGES in the tarball).
* Mon Jun 16 2003 ja@suse.cz
- File list fixed.
* Sun Apr 6 2003 agruen@suse.de
- Update to 2.2.7.
* Wed Feb 26 2003 agruen@suse.de
- Update to acl-2.2.3a, which has all our patches plus an
additional malloc bug fix.
* Mon Feb 24 2003 agruen@suse.de
- Increment libattr library version to 1.1.0.
- Add symbol level versioning for libacl.
* Sat Feb 8 2003 agruen@suse.de
- Fix a long standing bug in acl_get_file() for Default ACLs (that
probably was there from hour one), and another critical bug in
the libacl entry pre-allocation patch (introduced on Jan 22).
* Tue Jan 28 2003 agruen@suse.de
- Fix inconsistent declarations for visibility("hidden") attributes
("config.h" was not always included).
- Fix a signedness warning in getfacl/user_group.c with a type
cast.
* Wed Jan 22 2003 agruen@suse.de
- Update to acl-2.2.2
- Fix a memory leak in acl_init()
- Add memory pre-allocation support patch for libacl
- Add ACL copying functions patch
- Add visibility(hidden) patch that hides libacl internal functions
from the outside.
- Let mls@suse.de add the following package alias in Autobuild
for building packages against older releases:
libacl-devel -> acl-devel [for <= 8.1]
* Tue Jan 21 2003 agruen@suse.de
- Remove (Prereq: /sbin/ldconfig) tag, and use %%run_ldconfig
in %%post and %%postun instead.
- acl-devel was renamed to libacl-devel: add missing
`Obsoletes: acl-devel' tag to libacl-devel.
* Sun Jan 19 2003 agruen@suse.de
- Fix a typo and add a clarification in the acl.5 manual page.
* Fri Dec 13 2002 schwab@suse.de
- Fix filelist generation.
* Fri Dec 13 2002 jderfina@suse.cz
- upgrading to version 2.1.1
- spliting acl to acl (binaries), libacl (libraries) and libacl-devel
(development stuff). This spliting follows SGI's release.
* Thu Sep 5 2002 agruen@suse.de
- Update to 2.0.19 + additional corrections (see
acl-2.0.19/doc/CHANGES).
* Thu Aug 15 2002 agruen@suse.de
- Remove the suse_update_config macro and the config.* stuff.
(According to ro@suse.de this is not necessary.)
- Change the documentation path in builddefs.in instead of in
configure.in.
- Update to version 2.0.17
* Thu Jun 20 2002 uli@suse.de
- fixed for lib64
* Thu Jun 20 2002 lmuelle@suse.de
- Remove DESTDIR patch, use DIST_ROOT of package instead
- Fix library location in the devel package
- Update to version 2.0.11
* Tue May 7 2002 sf@suse.de
- moved libs to %%{_lib} (they were in /lib _and_ /usr/lib before)
* Mon Feb 25 2002 ro@suse.de
- initial package (v2.0.0) (split from xfsprogs spec)

201
acl.keyring Normal file
View file

@ -0,0 +1,201 @@
pub 4096R/5D1B36D7 2013-03-10 [utgår: 2014-03-10]
uid Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
uid Andreas Gruenbacher <agruen@kernel.org>
uid Andreas Gruenbacher <agruen@linbit.com>
uid Andreas Gruenbacher <agruen@gnu.org>
sub 4096R/1E505CE8 2013-03-10 [utgår: 2014-03-10]
pub 1024D/556B46D6 2007-02-27
uid Brandon Philips <brandon@ifup.org>
sub 4096g/14FC8E8F 2007-02-27
pub 4096R/0542DF34 2013-05-09
uid Brandon Philips <brandon@ifup.co>
uid Brandon Philips (CoreOS,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LjwiWSpnoGV7g8XGoIlMgkbJbD8U9zyooMBtseHlDC0/aGAIsAVawzN3Mg0Y
cMU6rQ0rm1VKrR/MK0tu9TiUMPZk/GgBOI/q4relrUlcp6fpDchXHzUHS1Ya49A/
FWKgZbk0dgwZRGbwYj4oHpc9bi6JvFOv+qSg5ctM5oW6h5GP50Kj3fM6mYY/jkr2
mxd5tEDyImvOmDJ+OMP+PoX5TzwIkubXfyh8lCsB1m4d2QARAQABiQIfBBgBAgAJ
BQJRi+moAhsMAAoJEBVDQyYFQt802yQP/2DX87YAtZtCWZZT0SZOoi8OhaE3TZSq
w+HToTiKZ0W1iTEui+SuGBWm/v4XweP2SMa4G8H0iAOjBwTe5qpu478kydZ4bxBv
YC9cKBz3L3rEarnTU824KyQzjNDdopUhQVUB9N2w2nC0cbniJo4L83TTHyQB9i7b
jUFLhQ8Cgg7ZeHnPfDNI281ehWBfAhBLhgqLi07CCj13394k6TtsLb8Ea1RT0rRT
tHrQTJea1sZH6YFK9QWCaBrzHIYT15kiH1Py+lH1gm/guvnOEWVYVOyX/evxCaMy
JHL7tYraFrK7zaggP8ICIi0sW77mdXEqu3sloRIRIQe+qCVTXjXi9oiKrm0cn9N/
H+OwC1OZYPm1i3xJJT+ThNoDzYYo2LzuMxVCMghxfgrAhjj/7wILAWGTym/w3J67
HT9xj2vsMia/ayC5kqakDOQbXv/pbdzxRwz3ojCY9narvE5yaZlq1uzKsCX9d+qs
gam10viiZlfcviFsLza4fn2gnzNLPPAMJ63ZdXxwgeoofZsCXsDi4dq70diu/uRs
Z+BlH36EX7KO6xhikBIZXN5c2LQWXywb9WXvvXP6qRzKBakxiiC/JoPHrqpLbtl2
mR0p9NRoHHf1IUXDjZXexP/GRnKfswjplhOMv5f6deolVmwpUryTFUxDsLUe/6H6
KnEMkpgpvVhQ
=qdVK
-----END PGP PUBLIC KEY BLOCK-----

225
acl.spec Normal file
View file

@ -0,0 +1,225 @@
#
# spec file for package acl
#
# Copyright (c) 2022-2023 ZhuningOS
#
# Ring0 does not have system-user-bin/system-user-daemon
%bcond_without acl_tests
Name: acl
%define lname libacl1
Summary: Commands for Manipulating POSIX Access Control Lists
License: GPL-2.0+ and LGPL-2.1+
Group: System/Filesystems
Version: 2.2.52
Release: 4.3.1
Url: http://download.savannah.gnu.org/releases-noredirect/acl/
#Git-Web: http://git.savannah.gnu.org/cgit/acl.git/
#Git-Clone: git://git.sv.gnu.org/acl
# Source is generated by git-archive v2.2.52 so that the subsequent commits
# apply cleanly.
Source: %name-%version.tar.bz2
Source2: baselibs.conf
# http://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=acl
Source3: %name.keyring
# Upstream changes since v2.2.52
Patch1: 0001-Install-the-libraries-to-the-appropriate-directory.patch
Patch2: 0002-setfacl.1-fix-typo-inclu-de-include.patch
Patch3: 0003-test-fix-insufficient-quoting-of.patch
Patch4: 0004-Makefile-rename-configure.in-to-configure.ac.patch
Patch5: 0005-Bad-markup-in-acl.5-page.patch
Patch6: 0006-.gitignore-ignore-and-config.h.in.patch
Patch7: 0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch
Patch8: 0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch
Patch9: 0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch
Patch10: 0010-punt-debian-rpm-packaging-logic.patch
Patch11: 0011-move-gettext-logic-into-misc.h.patch
Patch12: 0012-test-make-running-parallel-out-of-tree-safe.patch
Patch13: 0013-modernize-build-system.patch
Patch14: 0014-po-regenerate-files-after-move.patch
Patch15: 0015-build-drop-aclincludedir-use-pkgincludedir.patch
Patch16: 0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch
Patch17: 0017-build-ship-a-pkgconfig-file-for-libacl.patch
Patch18: 0018-read_acl_-comments-seq-rename-line-to-lineno.patch
Patch19: 0019-read_acl_-comments-seq-switch-to-next_line.patch
Patch20: 0020-telldir-return-value-and-seekdir-second-parameters-a.patch
Patch21: 0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch
Patch22: 0022-add-__acl_-prefixes-to-internal-symbols.patch
Patch23: 0023-cp.test-Check-permissions-of-the-right-file.patch
Patch24: 0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch
Patch25: 0025-fix-compilation-with-latest-xattr-git.patch
Patch26: 0026-getfacl-Fix-memory-leak.patch
Patch27: 0027-Fix-the-display-block-nesting-in-acl.5.patch
Patch28: 0028-setfacl-man-page-Minor-wording-improvements.patch
Patch29: 0029-getfacl-Fix-minor-resource-leak.patch
Patch30: 0030-Do-not-export-symbols-that-are-not-supposed-to-be-ex.patch
Patch31: 0031-walk_tree-mark-internal-variables-as-static.patch
Patch32: 0032-ignore-configure.lineno.patch
Patch33: 0001-test-Add-helper-library-to-fake-passwd-group-files.patch
Patch34: 0002-quote-escape-literal-backslashes.patch
# Local changes
Patch100: 0001-Use-OS-byteswapping-macros.patch
Patch101: acl-2.2.52-tests.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-tools-mini
BuildRequires: libattr-devel
BuildRequires: libtool
BuildRequires: pkg-config
%if %{with acl_tests} && 0%{?suse_version} > 1320
BuildRequires: system-user-bin
BuildRequires: system-user-daemon
%endif
#BuildRequires: gpg-offline
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
getfacl and setfacl commands for retrieving and setting POSIX access
control lists.
%package -n %lname
Summary: A dynamic library for accessing POSIX Access Control Lists
# bug437293
Group: System/Libraries
%ifarch ppc64
Obsoletes: libacl-64bit
%endif
# Added for 12.1
Provides: libacl = %version-%release
Obsoletes: libacl < %version-%release
%description -n %lname
This package contains the libacl.so dynamic library which contains the
POSIX 1003.1e draft standard 17 functions for manipulating access
control lists.
%package -n libacl-devel
Summary: Include Files and Libraries mandatory for Development
# the .so file references libattr.so.x, so require libattr-devel
Group: Development/Libraries/C and C++
Requires: %lname = %version
Requires: glibc-devel
Requires: libattr-devel
Provides: acl-devel = %version
Obsoletes: acl-devel < %version
# bug437293
%ifarch ppc64
Obsoletes: libacl-devel-64bit
%endif
#
%description -n libacl-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%setup -q -n acl-%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch100 -p1
%patch101 -p1
%build
chmod a+x po/update-potfiles
sh autogen.sh
export OPTIMIZER="%optflags -fPIC"
export DEBUG=-DNDEBUG
CFLAGS="%optflags"
%ifarch %ix86 i586
export CFLAGS="%optflags -D_FILE_OFFSET_BITS=64"
%endif
%configure \
--prefix=/usr \
--exec-prefix=/usr \
--libdir=/%_lib \
--libexecdir=/%_lib \
--disable-static \
--docdir=%_defaultdocdir/%name
make %{?_smp_mflags} V=1
%check
%if %{with acl_tests}
if ./setfacl -m u:`id -u`:rwx .; then
make check || (cat test-suite.log ; false)
else
echo '*** ACLs are probably not supported by the file system,' \
'the test-suite will NOT run ***'
fi
%endif
%install
%make_install
mkdir -p %buildroot/%_libdir
ln -sv /%_lib/$(readlink %buildroot/%_lib/lib%name.so) %buildroot/%_libdir/lib%name.so
rm -v %buildroot/%_lib/lib%name.{la,so}
# The library stays in /lib* but the pkgconfig file needs to go under /usr
mv -f %buildroot/%_lib/pkgconfig/ %buildroot/%_libdir
%find_lang %name
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -f %name.lang
%defattr(-,root,root)
%_bindir/chacl
%_bindir/getfacl
%_bindir/setfacl
%_defaultdocdir/acl/
%_mandir/man1/*.1*
%_mandir/man5/*.5*
%files -n libacl-devel
%defattr(-,root,root)
%_includedir/acl/
%_includedir/sys/acl.h
%_libdir/libacl.so
%_mandir/man3/*.3*
%_libdir/pkgconfig/libacl.pc
%files -n %lname
%defattr(755,root,root,755)
/%_lib/libacl.so.1*
%changelog

8
baselibs.conf Normal file
View file

@ -0,0 +1,8 @@
libacl1
obsoletes "libacl-<targettype> < <version>"
provides "libacl-<targettype> = <version>"
libacl-devel
requires -libacl-<targettype>
requires "libacl1-<targettype> = <version>"
obsoletes "acl-devel-<targettype> < <version>"
provides "acl-devel-<targettype> = <version>"