diff --git a/0001-Install-the-libraries-to-the-appropriate-directory.patch b/0001-Install-the-libraries-to-the-appropriate-directory.patch new file mode 100644 index 0000000..81bfdae --- /dev/null +++ b/0001-Install-the-libraries-to-the-appropriate-directory.patch @@ -0,0 +1,25 @@ +From cd76644ce9b9814a856579e2b98d4060d19cb162 Mon Sep 17 00:00:00 2001 +From: Brandon Philips +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 + diff --git a/0002-setfacl.1-fix-typo-inclu-de-include.patch b/0002-setfacl.1-fix-typo-inclu-de-include.patch new file mode 100644 index 0000000..cea1c71 --- /dev/null +++ b/0002-setfacl.1-fix-typo-inclu-de-include.patch @@ -0,0 +1,28 @@ +From 48cd4fe761e396e8897bf661ff81b86331ca2439 Mon Sep 17 00:00:00 2001 +From: John Bradshaw +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 + diff --git a/0003-test-fix-insufficient-quoting-of.patch b/0003-test-fix-insufficient-quoting-of.patch new file mode 100644 index 0000000..da3651d --- /dev/null +++ b/0003-test-fix-insufficient-quoting-of.patch @@ -0,0 +1,102 @@ +From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +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 + diff --git a/0004-Makefile-rename-configure.in-to-configure.ac.patch b/0004-Makefile-rename-configure.in-to-configure.ac.patch new file mode 100644 index 0000000..3dfb795 --- /dev/null +++ b/0004-Makefile-rename-configure.in-to-configure.ac.patch @@ -0,0 +1,29 @@ +From 57a78716049833b9ed662a0a45b6102e2aa9f970 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 +--- + 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 + diff --git a/0005-Bad-markup-in-acl.5-page.patch b/0005-Bad-markup-in-acl.5-page.patch new file mode 100644 index 0000000..da93053 --- /dev/null +++ b/0005-Bad-markup-in-acl.5-page.patch @@ -0,0 +1,92 @@ +From c000106df976473a79ec4afcfe0a4c303cafb823 Mon Sep 17 00:00:00 2001 +From: "Eric S. Raymond" +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 + diff --git a/0006-.gitignore-ignore-and-config.h.in.patch b/0006-.gitignore-ignore-and-config.h.in.patch new file mode 100644 index 0000000..84df86b --- /dev/null +++ b/0006-.gitignore-ignore-and-config.h.in.patch @@ -0,0 +1,22 @@ +From 63237b6d5a5ad1d5cc76d432336d904c3c567fd9 Mon Sep 17 00:00:00 2001 +From: Fabrice Bauzac +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 + diff --git a/0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch b/0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch new file mode 100644 index 0000000..79f1584 --- /dev/null +++ b/0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch @@ -0,0 +1,26 @@ +From c3ce1b78025002a404e5486bf8522ecf812cadcb Mon Sep 17 00:00:00 2001 +From: Fabrice Bauzac +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 + diff --git a/0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch b/0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch new file mode 100644 index 0000000..2a4d2e5 --- /dev/null +++ b/0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch @@ -0,0 +1,50 @@ +From 3f079d4e0512c9a241fb23c56a0421441c83621e Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 + diff --git a/0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch b/0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch new file mode 100644 index 0000000..eb3daa2 --- /dev/null +++ b/0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch @@ -0,0 +1,55 @@ +From fb071c302b8cad8837bc1e57407dc3ffa14d3f99 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +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 + diff --git a/0010-punt-debian-rpm-packaging-logic.patch b/0010-punt-debian-rpm-packaging-logic.patch new file mode 100644 index 0000000..1eda026 --- /dev/null +++ b/0010-punt-debian-rpm-packaging-logic.patch @@ -0,0 +1,1005 @@ +From c93b43c22331c3000ce15452943daa9bec77436c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 10 Jan 2014 10:07:38 -0500 +Subject: [PATCH 10/34] punt debian/rpm packaging logic + +These files haven't been updated in years. The respective upstreams +do their own thing now. Punt this code to make future cleanups easier. + +Signed-off-by: Mike Frysinger +--- + .gitignore | 5 - + Makefile | 2 +- + Makepkgs | 27 +--- + debian/Makefile | 51 ------- + debian/changelog | 335 ------------------------------------------ + debian/compat | 1 - + debian/control | 39 ----- + debian/copyright | 19 --- + debian/rules | 74 ---------- + debian/watch | 2 - + include/builddefs.in | 4 - + m4/package_utilies.m4 | 22 +-- + package/Makefile | 5 +- + package/rpm/Makefile | 76 ---------- + package/rpm/acl.spec.in | 79 ---------- + package/rpm/macros.template | 31 ---- + package/rpm/rpm-2.rc.template | 25 ---- + 17 files changed, 5 insertions(+), 792 deletions(-) + delete mode 100644 debian/Makefile + delete mode 100644 debian/changelog + delete mode 100644 debian/compat + delete mode 100644 debian/control + delete mode 100644 debian/copyright + delete mode 100755 debian/rules + delete mode 100644 debian/watch + delete mode 100644 package/rpm/Makefile + delete mode 100644 package/rpm/acl.spec.in + delete mode 100644 package/rpm/macros.template + delete mode 100644 package/rpm/rpm-2.rc.template + +diff --git a/.gitignore b/.gitignore +index 0f018b9..71009b9 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -9,11 +9,6 @@ + /acl-* + /aclocal.m4 + /autom4te.cache/ +-/build/rpm/*.rpm +-/build/rpm/acl.spec +-/build/rpm/rpm-*.rc +-/build/rpm/rpmfiles* +-/build/rpm/rpmmacros + /chacl/chacl + /config.guess + /config.log +diff --git a/Makefile b/Makefile +index d1188f2..235736e 100644 +--- a/Makefile ++++ b/Makefile +@@ -36,7 +36,7 @@ LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ + Logs/* built .census install.* install-dev.* install-lib.* *.gz + + LIB_SUBDIRS = include libmisc libacl +-TOOL_SUBDIRS = getfacl setfacl chacl m4 man doc po test examples package debian ++TOOL_SUBDIRS = getfacl setfacl chacl m4 man doc po test examples package + + SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +diff --git a/Makepkgs b/Makepkgs +index 8d20be9..52368f4 100755 +--- a/Makepkgs ++++ b/Makepkgs +@@ -15,12 +15,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # +-# Make whichever packages have been requested. +-# Defaults to RPMs. +-# + LOGDIR=Logs + +-type=rpm + verbose=false + + MAKE=${MAKE:-make} +@@ -31,41 +27,22 @@ do + case "$opt" in + clean) + ;; # ignored, kept for backward compatibility +- rpm) +- type=rpm ;; +- debian) +- type=debian ;; + verbose) + verbose=true ;; + *) +- echo "Usage: Makepkgs [verbose] [debian|rpm]"; exit 1 ;; ++ echo "Usage: Makepkgs [verbose]"; exit 1 ;; + esac + done + + # start with a clean manifest +-test -f files.rpm && rm -f files.rpm +-test -f filesdevel.rpm && rm -f filesdevel.rpm +-test -f fileslib.rpm && rm -f fileslib.rpm +- + test ! -d $LOGDIR && mkdir $LOGDIR + rm -rf $LOGDIR/* > /dev/null 2>&1 + + # build Debian packages, cleans itself before starting + SUDO=${SUDO:-sudo} + test ! -z "$SUDO" && sudo=$SUDO +-if [ $type = debian ] ; then +- LOGDEB=`pwd` +- LOGDEB=../`basename $LOGDEB`.log +- echo "== Debian build, log is $LOGDEB"; echo +- if $verbose ; then +- dpkg-buildpackage -r$SUDO | tee $LOGDEB +- else +- dpkg-buildpackage -r$SUDO > $LOGDEB || exit 1 +- fi +- exit 0 +-fi + +-# build RPM packages - manual clean before starting ++# build packages - manual clean before starting + echo "== clean, log is $LOGDIR/clean" + if $verbose ; then + $MAKE clean 2>&1 | tee $LOGDIR/clean +diff --git a/debian/Makefile b/debian/Makefile +deleted file mode 100644 +index 0a0fc2d..0000000 +--- a/debian/Makefile ++++ /dev/null +@@ -1,51 +0,0 @@ +-# +-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LIBPKG = lib$(PKG_NAME)1 +-LSRCFILES = changelog compat control copyright rules watch +-DEV_DOC_DIR = $(PKG_DOC_DIR)/../$(LIBPKG)-dev +-LIB_DOC_DIR = $(PKG_DOC_DIR)/../$(LIBPKG) +- +-default: +- +-include $(BUILDRULES) +- +-install: default +-ifeq ($(PKG_DISTRIBUTION), debian) +- $(INSTALL) -m 755 -d $(PKG_DOC_DIR) +- $(INSTALL) -m 644 changelog $(PKG_DOC_DIR)/changelog.Debian +-endif +- +-install-dev: default +-ifeq ($(PKG_DISTRIBUTION), debian) +- $(INSTALL) -m 755 -d $(PKG_DOC_DIR) +- $(INSTALL) -m 755 -d $(DEV_DOC_DIR) +- $(INSTALL) -m 644 copyright $(DEV_DOC_DIR) +- $(INSTALL) -m 644 changelog $(DEV_DOC_DIR)/changelog.Debian +-endif +- +-install-lib: default +-ifeq ($(PKG_DISTRIBUTION), debian) +- $(INSTALL) -m 755 -d $(PKG_DOC_DIR) +- $(INSTALL) -m 755 -d $(LIB_DOC_DIR) +- $(INSTALL) -m 644 copyright $(LIB_DOC_DIR) +- $(INSTALL) -m 644 changelog $(LIB_DOC_DIR)/changelog.Debian +-endif +diff --git a/debian/changelog b/debian/changelog +deleted file mode 100644 +index cb01da5..0000000 +--- a/debian/changelog ++++ /dev/null +@@ -1,335 +0,0 @@ +-acl (2.2.47-2) unstable; urgency=low +- +- * Acknowledge NMU. Closes: Closes: #477515 +- +- -- Anibal Monsalve Salazar Thu, 24 Apr 2008 06:47:12 +1000 +- +-acl (2.2.47-1.1) unstable; urgency=low +- +- * Non-maintainer upload. +- * Don't call configure with --enable-lib64=yes. (Closes: #477515) +- This fixes the lib64 rpaths, so no need to call chrpath anymore. +- +- -- Kurt Roeckx Wed, 23 Apr 2008 18:58:41 +0200 +- +-acl (2.2.47-1) unstable; urgency=low +- +- * New upstream release +- * Update debian/watch +- * Remove empty directories. Closes: #445902, #222534 +- * Fix the following lintian issues: +- W: acl source: package-uses-deprecated-debhelper-compat-version 1 +- W: acl source: out-of-date-standards-version 3.7.2 (current is 3.7.3) +- W: libacl1-dev: package-contains-empty-directory usr/share/doc/acl/ +- W: libacl1-dev: description-contains-homepage +- W: libacl1: package-contains-empty-directory usr/share/doc/acl/ +- W: libacl1: description-contains-homepage +- W: acl: description-contains-homepage +- W: acl: binary-or-shlib-defines-rpath ./usr/bin/chacl /lib64 +- W: acl: binary-or-shlib-defines-rpath ./usr/bin/getfacl /lib64 +- W: acl: binary-or-shlib-defines-rpath ./usr/bin/setfacl /lib64 +- +- -- Anibal Monsalve Salazar Wed, 23 Apr 2008 21:48:29 +1000 +- +-acl (2.2.45-1) unstable; urgency=low +- +- * New upstream release +- * debian/control: +- - Added homepage +- - Added myself as comaintainer +- - Set Standards-Version to 3.7.2 +- - libacl1-dev depends on libacl1 (= ${binary:Version}) +- - acl and libacl1 depend on ${misc:Depends} +- * debian/rules: Regenerate acl.pot +- * debian/watch: Added +- +- -- Anibal Monsalve Salazar Sat, 15 Sep 2007 14:28:33 +1000 +- +-acl (2.2.42-1) unstable; urgency=low +- +- * New upstream release +- * Incorporate Petr Salinger's GNU/kFreeBSD patch (closes: #401511) +- +- -- Nathan Scott Fri, 08 Dec 2006 14:21:40 +1100 +- +-acl (2.2.41-1) unstable; urgency=low +- +- * New upstream release +- * Rework translation Makefile slightly (closes: #375796) +- +- -- Nathan Scott Fri, 21 Jul 2006 09:37:35 +1000 +- +-acl (2.2.39-1) unstable; urgency=low +- +- * New upstream release +- * Add Swedish translation from Daniel Nylander (closes: #368656) +- * Fix get/setfacl segfault on non-existant files (closes: #370826) +- +- -- Nathan Scott Wed, 07 Jun 2006 09:30:45 +1000 +- +-acl (2.2.37-1) unstable; urgency=low +- +- * New upstream release +- * Fix tree walking with symbolic links (closes: #333160) +- +- -- Nathan Scott Tue, 02 May 2006 09:41:15 +1000 +- +-acl (2.2.36-1) unstable; urgency=low +- +- * New upstream release +- * Fixed build dependency on libc-dev (closes: #358788) +- +- -- Nathan Scott Tue, 28 Mar 2006 09:14:25 +1100 +- +-acl (2.2.35-1) unstable; urgency=low +- +- * New upstream release +- * Switch from debmake to debhelper +- +- -- Nathan Scott Wed, 15 Feb 2006 20:43:49 +1100 +- +-acl (2.2.34-1) unstable; urgency=low +- +- * New upstream release +- * Add libacl1-dev dependency on libattr1-dev (closes: #339786, #341711) +- +- -- Nathan Scott Mon, 05 Dec 2005 11:15:41 +1100 +- +-acl (2.2.33-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Thu, 10 Nov 2005 07:59:12 +1100 +- +-acl (2.2.32-1) unstable; urgency=low +- +- * New upstream release +- * Added French translation (closes: #330596) +- +- -- Nathan Scott Thu, 29 Sep 2005 09:47:28 +1000 +- +-acl (2.2.29-1) unstable; urgency=low +- +- * New upstream release +- * Replace use of _POSIX_PATH_MAX with PATH_MAX (closes: #292819) +- +- -- Nathan Scott Mon, 31 Jan 2005 20:13:02 +1100 +- +-acl (2.2.28-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Tue, 30 Nov 2004 15:29:29 +1100 +- +-acl (2.2.26-1) unstable; urgency=low +- +- * New upstream release +- * acl.5 man page user/group typo fixed (closes: #272186) +- +- -- Nathan Scott Fri, 10 Sep 2004 10:51:19 +1000 +- +-acl (2.2.23-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Mon, 02 Feb 2004 12:35:56 +1100 +- +-acl (2.2.21-1) unstable; urgency=low +- +- * New upstream release +- * Make libacl1-dev conflict on kerberos4kth versioned (closes: #219715) +- +- -- Nathan Scott Mon, 10 Nov 2003 09:23:21 +1100 +- +-acl (2.2.20-1) unstable; urgency=low +- +- * New upstream release +- * Fix incorrect man page entry (closes: #213244) +- * Fix GNU/Hurd build issues, thanks to Robert Millan (closes: #215153) +- +- -- Nathan Scott Mon, 13 Oct 2003 13:07:43 +1000 +- +-acl (2.2.15-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Fri, 08 Aug 2003 16:39:10 +1000 +- +-acl (2.2.14-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Mon, 04 Aug 2003 09:18:00 +1000 +- +-acl (2.2.13-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Tue, 29 Jul 2003 11:27:53 +1000 +- +-acl (2.2.12-1) unstable; urgency=low +- +- * Don't always call msgmerge, fix from Steve Langasek (closes: #199277) +- +- -- Nathan Scott Thu, 3 Jul 2003 10:55:01 +1000 +- +-acl (2.2.11-1) unstable; urgency=low +- +- * New upstream release +- * Fix lib package dependencies, thanks to Steve Langasek (closes: #193149) +- +- -- Nathan Scott Wed, 04 Jun 2003 15:50:50 +1000 +- +-acl (2.2.10-1) unstable; urgency=low +- +- * New upstream release +- * Added runtime conflict with libacl1-kerberos4kth, as the +- presence of this package breaks Samba's use of libacl1. +- +- -- Nathan Scott Mon, 26 May 2003 11:38:53 +1000 +- +-acl (2.2.9-1) unstable; urgency=low +- +- * New upstream release +- * Updated policy version to which this package conforms +- * Fine-tuned the libacl1-dev dependencies a bit (closes: #188068) +- +- -- Nathan Scott Sat, 26 Apr 2003 04:36:01 +1000 +- +-acl (2.2.4-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Mon, 10 Feb 2003 16:15:18 +1100 +- +-acl (2.2.1-1) unstable; urgency=low +- +- * Clarify acl(5) with respect to fileutils support (closes: #172642) +- * Fix a bash-ism in debian/rules (closes: #173025) +- +- -- Nathan Scott Mon, 16 Dec 2002 09:40:50 +1100 +- +-acl (2.2.0-1) unstable; urgency=low +- +- * New upstream release +- * Added runtime conflict with kerberos4kth-dev (closes: #172169) +- +- -- Nathan Scott Mon, 9 Dec 2002 08:09:15 +1100 +- +-acl (2.1.1-1) unstable; urgency=low +- +- * Fix Debian package dependency rules for acl (closes: #166709) +- * Fix the group for libacl1, was "utils" now "libs" (closes: #166835) +- +- -- Nathan Scott Tue, 29 Oct 2002 09:29:52 +1100 +- +-acl (2.1.0-1) unstable; urgency=low +- +- * New upstream release, changing dev package name (closes: #141756) +- +- -- Nathan Scott Sat, 19 Oct 2002 08:40:38 +1000 +- +-acl (2.0.19-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Thu, 5 Sep 2002 09:12:02 +1000 +- +-acl (2.0.17-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Tue, 13 Aug 2002 07:52:54 +1000 +- +-acl (2.0.15-1) unstable; urgency=low +- +- * New upstream release (build-related and docs changes only) +- * Follow Steve Langasek's advice to fix libattr issue (closes: #150854) +- +- -- Nathan Scott Thu, 4 Jul 2002 12:10:38 +1000 +- +-acl (2.0.14-1) unstable; urgency=low +- +- * New upstream release (build-related changes only) +- +- -- Nathan Scott Thu, 4 Jul 2002 12:10:38 +1000 +- +-acl (2.0.13-1) unstable; urgency=low +- +- * New upstream release for (even) closer standard compliance +- * Increment the libacl version from 1.0.1 to 1.0.2 +- +- -- Nathan Scott Tue, 25 Jun 2002 17:08:03 +1000 +- +-acl (2.0.12-1) unstable; urgency=low +- +- * Increment the libacl version from 1.0.0 to 1.0.1 (closes: #150854) +- +- -- Nathan Scott Tue, 25 Jun 2002 08:27:20 +1000 +- +-acl (2.0.11-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Wed, 1 May 2002 09:30:54 +1000 +- +-acl (2.0.10-1) unstable; urgency=low +- +- * New upstream bugfix release +- * Add accidentally removed dependency of libacl on libattr +- +- -- Nathan Scott Mon, 22 Apr 2002 15:12:21 +1000 +- +-acl (2.0.9-1) unstable; urgency=low +- +- * New upstream bugfix release (affects 64 bit platforms only) +- +- -- Nathan Scott Tue, 16 Apr 2002 08:31:48 +1000 +- +-acl (2.0.8-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Sat, 13 Apr 2002 09:45:06 +1000 +- +-acl (2.0.7-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Wed, 10 Apr 2002 09:50:24 +1100 +- +-acl (2.0.6-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Mon, 8 Apr 2002 08:56:34 +1100 +- +-acl (2.0.5-1) unstable; urgency=low +- +- * New upstream release +- +- -- Nathan Scott Wed, 27 Mar 2002 08:47:58 +1100 +- +-acl (2.0.4-2) unstable; urgency=low +- +- * Fix attr-dev build dependency issue (closes: #138280) +- +- -- Nathan Scott Fri, 15 Mar 2002 07:08:50 +1100 +- +-acl (2.0.4-1) unstable; urgency=low +- +- * New upstream bugfix release +- +- -- Nathan Scott Tue, 12 Mar 2002 09:47:50 +1100 +- +-acl (2.0.2-1) unstable; urgency=low +- +- * Initial release (closes: #97686) +- * Uses the official Linux extended attributes interfaces (currently +- supported by ext2, ext3, and XFS) +- +- -- Nathan Scott Tue, 26 Feb 2002 13:25:26 +1100 +- +-Local variables: +-mode: debian-changelog +-End: +diff --git a/debian/compat b/debian/compat +deleted file mode 100644 +index 7ed6ff8..0000000 +--- a/debian/compat ++++ /dev/null +@@ -1 +0,0 @@ +-5 +diff --git a/debian/control b/debian/control +deleted file mode 100644 +index 1681b0b..0000000 +--- a/debian/control ++++ /dev/null +@@ -1,39 +0,0 @@ +-Source: acl +-Section: utils +-Priority: optional +-Maintainer: Nathan Scott +-Uploaders: Anibal Monsalve Salazar , Niv Sardi +-Build-Depends: autoconf, debhelper (>= 5), gettext, libtool, libattr1-dev (>= 2.4.4) +-Standards-Version: 3.7.3 +-Homepage: http://oss.sgi.com/projects/xfs/ +- +-Package: acl +-Depends: ${shlibs:Depends}, ${misc:Depends} +-Architecture: any +-Description: Access control list utilities +- This package contains the getfacl and setfacl utilities needed for +- manipulating access control lists. +- +-Package: libacl1-dev +-Section: libdevel +-Priority: extra +-Depends: libc6-dev | libc-dev, libacl1 (= ${binary:Version}), libattr1-dev (>= 2.4.4) +-Provides: acl-dev +-Replaces: acl-dev +-Conflicts: acl-dev, acl (<< 2.0.0), kerberos4kth-dev (<< 1.2.2-4) +-Architecture: any +-Description: Access control list static libraries and headers +- This package contains the static libraries and header files needed +- for developing programs which make use of the access control list +- programming interface defined in POSIX 1003.1e draft standard 17. +- +-Package: libacl1 +-Depends: ${shlibs:Depends}, ${misc:Depends} +-Section: libs +-Priority: required +-Conflicts: acl (<< 2.0.0), libacl1-kerberos4kth +-Architecture: any +-Description: Access control list shared library +- This package contains the libacl.so dynamic library containing +- the POSIX 1003.1e draft standard 17 functions for manipulating +- access control lists. +diff --git a/debian/copyright b/debian/copyright +deleted file mode 100644 +index a7dd472..0000000 +--- a/debian/copyright ++++ /dev/null +@@ -1,19 +0,0 @@ +-This package was debianized by Nathan Scott nathans@debian.org on +-Tue, 26 Feb 2002 13:25:26 +1100 +- +-It can be downloaded from ftp://acl.bestbits.at/ +- +-Copyright: +- +-Copyright (C) 2001 Andreas Gruenbacher. +-Copyright (C) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. +- +-You are free to distribute this software under Version 2.1 +-of the GNU Lesser General Public License. +-On Debian systems, refer to /usr/share/common-licenses/LGPL-2.1 +-for the complete text of the GNU Lesser General Public License. +- +-Certain components (as annotated in the source) are licensed +-under the terms of the GNU General Public License. +-On Debian systems, the complete text of the GNU General Public +-License can be found in /usr/share/common-licenses/GPL file. +diff --git a/debian/rules b/debian/rules +deleted file mode 100755 +index 41293b3..0000000 +--- a/debian/rules ++++ /dev/null +@@ -1,74 +0,0 @@ +-#!/usr/bin/make -f +- +-export DH_VERBOSE=1 +- +-package = acl +-develop = lib$(package)1-dev +-library = lib$(package)1 +- +-dirme = debian/$(package) +-dirdev = debian/$(develop) +-dirlib = debian/$(library) +-pkgme = DIST_ROOT=`pwd`/$(dirme); export DIST_ROOT; +-pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; +-pkglib = DIST_ROOT=`pwd`/$(dirlib); export DIST_ROOT; +-stdenv = @GZIP=-q; export GZIP; +- +-options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \ +- INSTALL_USER=root INSTALL_GROUP=root ; +-checkdir = test -f debian/rules +- +-build: built +-built: config +- @echo "== dpkg-buildpackage: build" 1>&2 +- $(MAKE) default +- cd po; rm -rf acl.pot; make acl.pot +- touch built +- +-config: .census +-.census: +- @echo "== dpkg-buildpackage: configure" 1>&2 +- $(checkdir) +- $(options) $(MAKE) configure +- touch .census +- +-clean: +- @echo "== dpkg-buildpackage: clean" 1>&2 +- $(checkdir) +- -rm -f built .census +- $(MAKE) distclean +- -rm -rf $(dirme) $(dirdev) $(dirlib) +- -rm -f debian/*substvars debian/files* debian/*.debhelper +- +-binary-indep: +- +-binary-arch: checkroot built +- @echo "== dpkg-buildpackage: binary-arch" 1>&2 +- $(checkdir) +- -rm -rf $(dirme) $(dirdev) $(dirlib) +- $(pkgme) $(MAKE) -C . install +- $(pkgdev) $(MAKE) -C . install-dev +- $(pkglib) $(MAKE) -C . install-lib +- $(pkgme) $(MAKE) -C build src-manifest +- rmdir debian/libacl1-dev/usr/share/doc/acl +- rmdir debian/libacl1/usr/share/doc/acl +- dh_installdocs +- dh_installchangelogs +- dh_strip +- dh_compress +- dh_fixperms +- dh_makeshlibs -N $(library) +- dh_makeshlibs -p $(library) -V 'libacl1 (>= 2.2.11-1)' +- dh_installdeb +- dh_shlibdeps +- dh_gencontrol +- +- dh_md5sums +- dh_builddeb +- +-binary: binary-indep binary-arch +- +-checkroot: +- test 0 -eq `id -u` +- +-.PHONY: binary binary-arch binary-indep clean checkroot +diff --git a/debian/watch b/debian/watch +deleted file mode 100644 +index c14272b..0000000 +--- a/debian/watch ++++ /dev/null +@@ -1,2 +0,0 @@ +-version=3 +-ftp://oss.sgi.com/projects/xfs/cmd_tars/ acl_([\d]+[\d\.]*)-[\d].tar.gz +diff --git a/include/builddefs.in b/include/builddefs.in +index 5c3e0d6..9ed15b4 100644 +--- a/include/builddefs.in ++++ b/include/builddefs.in +@@ -54,10 +54,6 @@ MSGFMT = @msgfmt@ + MSGMERGE = @msgmerge@ + XGETTEXT = @xgettext@ + +-RPM = @rpm@ +-RPMBUILD = @rpmbuild@ +-RPM_VERSION = @rpm_version@ +- + ENABLE_SHARED = @enable_shared@ + ENABLE_GETTEXT = @enable_gettext@ + +diff --git a/m4/package_utilies.m4 b/m4/package_utilies.m4 +index 4de3d3b..e372a6b 100644 +--- a/m4/package_utilies.m4 ++++ b/m4/package_utilies.m4 +@@ -28,7 +28,7 @@ AC_DEFUN([AC_PACKAGE_NEED_UTILITY], + # Generic macro, sets up all of the global build variables. + # The following environment variables may be set to override defaults: + # CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT +-# MSGFMT MSGMERGE XGETTEXT RPM ++# MSGFMT MSGMERGE XGETTEXT + # + AC_DEFUN([AC_PACKAGE_UTILITIES], + [ AC_PROG_CC +@@ -92,24 +92,4 @@ AC_DEFUN([AC_PACKAGE_UTILITIES], + + AC_DEFINE([ENABLE_GETTEXT], 1, [enable gettext]) + fi +- +- AC_PATH_PROG(RPM, rpm,, $search_path) +- rpm=$RPM +- AC_SUBST(rpm) +- +- dnl .. and what version is rpm +- rpm_version=0 +- test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \ +- | awk '{print $NF}' | awk -F. '{V=1; print $V}'` +- AC_SUBST(rpm_version) +- dnl At some point in rpm 4.0, rpm can no longer build rpms, and +- dnl rpmbuild is needed (rpmbuild may go way back; not sure) +- dnl So, if rpm version >= 4.0, look for rpmbuild. Otherwise build w/ rpm +- if test $rpm_version -ge 4; then +- AC_PATH_PROG(RPMBUILD, rpmbuild) +- rpmbuild=$RPMBUILD +- else +- rpmbuild=$RPM +- fi +- AC_SUBST(rpmbuild) + ]) +diff --git a/package/Makefile b/package/Makefile +index 0e87a20..6f5aa69 100644 +--- a/package/Makefile ++++ b/package/Makefile +@@ -25,7 +25,7 @@ SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz + LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-* + + # for clean and clobber +-SUBDIRS = tar rpm ++SUBDIRS = tar + + # nothing to build here (it's all packaging) + default install install-dev install-lib: +@@ -57,7 +57,4 @@ dist : default $(MANIFEST) + if [ -x $(TAR) ]; then \ + ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \ + fi; \ +- if [ -x $(RPMBUILD) ]; then \ +- ( echo "=== rpm ===" && $(MAKEF) -C rpm $@ || exit $$? ); \ +- fi; \ + test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done +diff --git a/package/rpm/Makefile b/package/rpm/Makefile +deleted file mode 100644 +index 041b84c..0000000 +--- a/package/rpm/Makefile ++++ /dev/null +@@ -1,76 +0,0 @@ +-# +-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = ../.. +-TREEROOT = $(shell cd ${TOPDIR}; pwd) +-include $(TOPDIR)/include/builddefs +- +-SPECF = $(PKG_NAME).spec +-LDIRT = *.rpm $(SPECF) rpmmacros rpmfiles* rpm-*.rc +- +-LSRCFILES = macros.template $(SPECF).in rpm-2.rc.template +- +-default install install-dev install-lib: +- +-include $(BUILDRULES) +- +-# Generate a binary rpm file +-dist : default $(SPECF) rpm-$(RPM_VERSION).rc +- $(RPMBUILD) -ba --rcfile ./rpm-$(RPM_VERSION).rc $(SPECF) +- +-# Because rpm prior to v.2.90 does not support macros and old style config +-# is not supported by rpm v.3, we have to resort to such ugly hacks +-ifneq ($(RPM_VERSION),2) +-rpm-$(RPM_VERSION).rc : rpmmacros +- @$(SED) -e '/^macrofiles:/s|~/.rpmmacros|rpmmacros|' $@ +- +-rpmmacros : macros.template +- @$(SED) -e 's|%topdir%|$(TREEROOT)|g' < $< > $@ +-else +-rpm-2.rc: rpm-2.rc.template +- @$(SED) -e 's|%topdir%|$(TOPDIR)|g' < $< > $@ +-endif +- +-# Generate the rpm specfile format file list from the install-sh manifest +-rpmfiles rpmfiles-dev rpmfiles-lib: +- $(SORT) -u $$DIST_MANIFEST | $(AWK) > $@ '\ +-$$1 == "d" { printf ("%%%%dir %%%%attr(%s,%s,%s) %s\n", $$2, $$3, $$4, $$5); } \ +-$$1 == "f" { if (match ($$6, "$(PKG_MAN_DIR)") || \ +- match ($$6, "$(PKG_DOC_DIR)")) \ +- printf ("%%%%doc "); \ +- if (match ($$6, "$(PKG_MAN_DIR)")) \ +- printf ("%%%%attr(%s,%s,%s) %s*\n", $$2, $$3, $$4, $$6); \ +- else \ +- printf ("%%%%attr(%s,%s,%s) %s\n", $$2, $$3, $$4, $$6); } \ +-$$1 == "l" { if (match ($$3, "$(PKG_MAN_DIR)") || \ +- match ($$3, "$(PKG_DOC_DIR)")) \ +- printf ("%%%%doc "); \ +- if (match ($$3, "$(PKG_MAN_DIR)")) \ +- printf ("%%%%attr(0777,root,root) %s*\n", $$3); \ +- else \ +- printf ("%%%%attr(0777,root,root) %s\n", $$3); }' +- +-.PHONY: $(SPECF) +-${SPECF} : ${SPECF}.in +- $(SED) -e's|@pkg_name@|$(PKG_NAME)|g' \ +- -e's|@pkg_version@|$(PKG_VERSION)|g' \ +- -e's|@pkg_release@|$(PKG_RELEASE)|g' \ +- -e's|@pkg_distribution@|$(PKG_DISTRIBUTION)|g' \ +- -e's|@build_root@|$(DIST_ROOT)|g' \ +- -e'/^BuildRoot: *$$/d' \ +- -e's|@make@|$(MAKE)|g' < $< > $@ +diff --git a/package/rpm/acl.spec.in b/package/rpm/acl.spec.in +deleted file mode 100644 +index 7946462..0000000 +--- a/package/rpm/acl.spec.in ++++ /dev/null +@@ -1,79 +0,0 @@ +-Summary: Access control list utilities. +-Name: @pkg_name@ +-Version: @pkg_version@ +-Release: @pkg_release@ +-Packager: Silicon Graphics, Inc. +-BuildRoot: @build_root@ +-Source: @pkg_name@-@pkg_version@.src.tar.gz +-License: GPL +-Vendor: Silicon Graphics, Inc. +-Group: System Environment/Base +-URL: http://acl.bestbits.at/ +- +-%description +-This package contains the getfacl and setfacl utilities needed for +-manipulating access control lists. +- +-%package -n libacl +-Summary: Dynamic library for access control list support. +-Group: Development/Libraries +-Prereq: /sbin/ldconfig +- +-%description -n libacl +-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: Access control list static libraries and headers. +-Group: Development/Libraries +-Requires: libacl +-Provides: acl-devel +-Obsoletes: acl-devel +- +-%description -n libacl-devel +-This package contains static libraries and header files needed to develop +-programs which make use of the access control list programming interface +-defined in POSIX 1003.1e draft standard 17. +- +-%prep +-if [ -f .census ] ; then +- if [ ! -d ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} ] ; then +- ln -s . ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} +- fi +-else +-%setup +-INSTALL_USER=root +-INSTALL_GROUP=root +-export INSTALL_USER INSTALL_GROUP +-@make@ configure +-fi +- +-%build +-@make@ +- +-%install +-DIST_ROOT="$RPM_BUILD_ROOT" +-DIST_INSTALL=`pwd`/install.manifest +-DIST_INSTALL_DEV=`pwd`/install-dev.manifest +-DIST_INSTALL_LIB=`pwd`/install-lib.manifest +-export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB +-@make@ install DIST_MANIFEST="$DIST_INSTALL" +-@make@ -C build/rpm rpmfiles DIST_MANIFEST="$DIST_INSTALL" +-@make@ install-dev DIST_MANIFEST="$DIST_INSTALL_DEV" +-@make@ -C build/rpm rpmfiles-dev DIST_MANIFEST="$DIST_INSTALL_DEV" +-@make@ install-lib DIST_MANIFEST="$DIST_INSTALL_LIB" +-@make@ -C build/rpm rpmfiles-lib DIST_MANIFEST="$DIST_INSTALL_LIB" +- +-%clean +-rm -rf $RPM_BUILD_ROOT +- +-%post -n libacl -p /sbin/ldconfig +- +-%postun -n libacl -p /sbin/ldconfig +- +-%files -f build/rpm/rpmfiles +- +-%files -n libacl-devel -f build/rpm/rpmfiles-dev +- +-%files -n libacl -f build/rpm/rpmfiles-lib +diff --git a/package/rpm/macros.template b/package/rpm/macros.template +deleted file mode 100644 +index 4557242..0000000 +--- a/package/rpm/macros.template ++++ /dev/null +@@ -1,31 +0,0 @@ +-# +-# rpmrc.template +-# +-# Template to fudge rpm directory structure inside IRIX-like build +-# environment +- +-# Force 386 build on all platforms +-# (why that?) +-#%_target i386-pc-linux +-#%_target_cpu i386 +-#%_target_os linux +- +-# topdir == $(WORKAREA) +-%_topdir %topdir% +- +-# Following directories are specific to the topdir +-# This is where build is done. In our case it's the same as $WORKAREA +-%_builddir %topdir% +- +-# This is where foo.1.99.tar.gz is living in the real world. +-# Be careful not to run full rpm build as it will override the sources +-%_sourcedir %topdir%/build +- +-# This is where binary RPM and source RPM would end up +-%_rpmdir %topdir%/build/rpm +-%_srcrpmdir %topdir%/build/rpm +-%_specdir %topdir%/build/rpm +- +-# Leave RPM files in the same directory - we're not building for +-# multiple architectures +-%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm +diff --git a/package/rpm/rpm-2.rc.template b/package/rpm/rpm-2.rc.template +deleted file mode 100644 +index f3b3eba..0000000 +--- a/package/rpm/rpm-2.rc.template ++++ /dev/null +@@ -1,25 +0,0 @@ +-# +-# rpmrc.template +-# +-# Template to fudge rpm directory structure inside IRIX-like build +-# environment +- +-# topdir == $(WORKAREA) +-topdir: %topdir% +- +-# Following directories are specific to the topdir +-# This is where build is done. In out case it's the same as $WORKAREA +-# Be careful not to run full rpm build as it will override the sources +-builddir: %topdir% +- +-# This is where foo.1.99.tar.gz is living in the real world. +-sourcedir: %topdir%/build +- +-# This is where binary RPM and source RPM would end up +-rpmdir: %topdir%/build/rpm +-srcrpmdir: %topdir%/build/rpm +-specdir: %topdir%/build/rpm +- +-# Leave RPM files in the same directory - we're not building for +-# multiple architectures +-rpmfilename: %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm +-- +2.5.2 + diff --git a/0011-move-gettext-logic-into-misc.h.patch b/0011-move-gettext-logic-into-misc.h.patch new file mode 100644 index 0000000..fd21cb3 --- /dev/null +++ b/0011-move-gettext-logic-into-misc.h.patch @@ -0,0 +1,180 @@ +From 602dbcb26e9591922ca94f5b326694a2309fff18 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + #include + #include +@@ -29,8 +30,7 @@ + #include + #include + #include +-#include +-#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 + #include + #include +@@ -34,11 +35,9 @@ + #include + #include + #include +-#include +-#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 +-# define _(x) gettext(x) +-#else +-# define _(x) (x) +-# define textdomain(d) do { } while (0) +-# define bindtextdomain(d,dir) do { } while (0) +-#endif +-#include +- + /* On GNU/kFreeBSD, ENODATA is not defined in the system headers */ + #include + #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 . + */ + ++#ifndef __MISC_H ++#define __MISC_H ++ ++#include ++ + 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 ++# define _(x) gettext(x) ++#else ++# define _(x) (x) ++# define textdomain(d) do { } while (0) ++# define bindtextdomain(d,dir) do { } while (0) ++#endif ++#include ++ ++#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 + #include + #include +@@ -33,10 +34,10 @@ + #include + #include + #include ++#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 + #include + #include +@@ -29,13 +30,11 @@ + #include + #include + #include +-#include +-#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 + diff --git a/0012-test-make-running-parallel-out-of-tree-safe.patch b/0012-test-make-running-parallel-out-of-tree-safe.patch new file mode 100644 index 0000000..0ff582e --- /dev/null +++ b/0012-test-make-running-parallel-out-of-tree-safe.patch @@ -0,0 +1,157 @@ +From 2d13383b7fbcc04fc16681caa4f43d9d9083cca1 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 = ; $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 + diff --git a/0013-modernize-build-system.patch b/0013-modernize-build-system.patch new file mode 100644 index 0000000..6f0d780 --- /dev/null +++ b/0013-modernize-build-system.patch @@ -0,0 +1,9834 @@ +From c8f23c92177c5a82ab3699b1b0d4acbee9afb770 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 10 Jan 2014 10:07:41 -0500 +Subject: [PATCH 13/34] modernize build system + +This deletes the hand rolled build system and replaces it entirely +with autotools. The overall diffstat shows that this is a clear +win, and it makes the package build/install like every other autotool +package out there which makes the lives of distro maintainers a lot +easier. + +This should also be faster by virtue of using a non-recursive build. + +Things to note: + - to generate autotools: + ./autogen.sh + - to see full compile output: + make V=1 + - to build specific targets: + make attr getfattr ... + - to run tests: + make check + - to create a release: + make distcheck -j + +Other non-developer things: + - man pages are no longer compressed as this is uncommon in the + autotools world and distros don't need it anyways (they already + handle it automatically for most pakages) + - the minor # of the shared library is now based on the package + version so it'll be much bigger ... this isn't a problem, and + is actually a bugfix (older releases didn't change when they + should have) + +(Again, this is all using the standard autotool targets.) +--- + .gitignore | 48 +-- + Makefile | 115 ------- + Makefile.am | 32 ++ + Makepkgs | 80 ----- + VERSION | 7 - + autogen.sh | 4 + + chacl/Makefile | 35 --- + chacl/chacl.c | 354 --------------------- + configure.ac | 60 ++-- + doc/Makefile | 42 --- + doc/Makemodule.am | 10 + + doc/TODO | 2 - + examples/Makefile | 30 +- + examples/Makefile.examples | 9 - + examples/Makemodule.am | 7 + + getfacl/Makefile | 36 --- + getfacl/getfacl.c | 747 --------------------------------------------- + getfacl/user_group.c | 59 ---- + getfacl/user_group.h | 31 -- + include/Makefile | 40 --- + include/Makemodule.am | 10 + + include/builddefs.in | 94 ------ + include/buildmacros | 160 ---------- + include/buildrules | 104 ------- + include/config.h.in | 46 --- + include/install-sh | 365 ---------------------- + libacl/Makefile | 68 ----- + libacl/Makemodule.am | 81 +++++ + libmisc/Makefile | 31 -- + libmisc/Makemodule.am | 8 + + m4/.gitignore | 3 + + m4/Makefile | 34 --- + m4/manual_format.m4 | 31 -- + m4/multilib.m4 | 43 --- + m4/package_globals.m4 | 61 ---- + m4/package_utilies.m4 | 95 ------ + man/Makefile | 41 --- + man/Makemodule.am | 3 + + man/man1/Makefile | 35 --- + man/man1/Makemodule.am | 4 + + man/man3/Makefile | 35 --- + man/man3/Makemodule.am | 40 +++ + man/man5/Makefile | 35 --- + man/man5/Makemodule.am | 2 + + package/Makefile | 60 ---- + package/tar/Makefile | 36 --- + po/.gitignore | 12 + + po/LINGUAS | 3 + + po/Makefile | 42 --- + po/Makevars | 41 +++ + po/update-potfiles | 13 + + setfacl/Makefile | 36 --- + setfacl/do_set.c | 528 -------------------------------- + setfacl/do_set.h | 36 --- + setfacl/parse.c | 594 ----------------------------------- + setfacl/parse.h | 85 ------ + setfacl/sequence.c | 162 ---------- + setfacl/sequence.h | 115 ------- + setfacl/setfacl.c | 669 ---------------------------------------- + test/.gitignore | 1 + + test/Makefile | 50 --- + test/Makemodule.am | 27 ++ + test/root/getfacl.test | 4 + + test/root/permissions.test | 3 +- + test/root/restore.test | 4 + + test/root/setfacl.test | 4 + + test/run | 8 + + tools/Makemodule.am | 23 ++ + tools/chacl.c | 354 +++++++++++++++++++++ + tools/do_set.c | 528 ++++++++++++++++++++++++++++++++ + tools/do_set.h | 36 +++ + tools/getfacl.c | 747 +++++++++++++++++++++++++++++++++++++++++++++ + tools/parse.c | 594 +++++++++++++++++++++++++++++++++++ + tools/parse.h | 85 ++++++ + tools/sequence.c | 162 ++++++++++ + tools/sequence.h | 115 +++++++ + tools/setfacl.c | 669 ++++++++++++++++++++++++++++++++++++++++ + tools/user_group.c | 59 ++++ + tools/user_group.h | 31 ++ + 79 files changed, 3798 insertions(+), 5315 deletions(-) + delete mode 100644 Makefile + create mode 100644 Makefile.am + delete mode 100755 Makepkgs + delete mode 100644 VERSION + create mode 100755 autogen.sh + delete mode 100644 chacl/Makefile + delete mode 100644 chacl/chacl.c + delete mode 100644 doc/Makefile + create mode 100644 doc/Makemodule.am + delete mode 100644 examples/Makefile.examples + create mode 100644 examples/Makemodule.am + delete mode 100644 getfacl/Makefile + delete mode 100644 getfacl/getfacl.c + delete mode 100644 getfacl/user_group.c + delete mode 100644 getfacl/user_group.h + delete mode 100644 include/Makefile + create mode 100644 include/Makemodule.am + delete mode 100644 include/builddefs.in + delete mode 100644 include/buildmacros + delete mode 100644 include/buildrules + delete mode 100644 include/config.h.in + delete mode 100755 include/install-sh + delete mode 100644 libacl/Makefile + create mode 100644 libacl/Makemodule.am + delete mode 100644 libmisc/Makefile + create mode 100644 libmisc/Makemodule.am + create mode 100644 m4/.gitignore + delete mode 100644 m4/Makefile + delete mode 100644 m4/manual_format.m4 + delete mode 100644 m4/multilib.m4 + delete mode 100644 m4/package_globals.m4 + delete mode 100644 m4/package_utilies.m4 + delete mode 100644 man/Makefile + create mode 100644 man/Makemodule.am + delete mode 100644 man/man1/Makefile + create mode 100644 man/man1/Makemodule.am + delete mode 100644 man/man3/Makefile + create mode 100644 man/man3/Makemodule.am + delete mode 100644 man/man5/Makefile + create mode 100644 man/man5/Makemodule.am + delete mode 100644 package/Makefile + delete mode 100644 package/tar/Makefile + create mode 100644 po/.gitignore + create mode 100644 po/LINGUAS + delete mode 100644 po/Makefile + create mode 100644 po/Makevars + create mode 100755 po/update-potfiles + delete mode 100644 setfacl/Makefile + delete mode 100644 setfacl/do_set.c + delete mode 100644 setfacl/do_set.h + delete mode 100644 setfacl/parse.c + delete mode 100644 setfacl/parse.h + delete mode 100644 setfacl/sequence.c + delete mode 100644 setfacl/sequence.h + delete mode 100644 setfacl/setfacl.c + create mode 100644 test/.gitignore + delete mode 100644 test/Makefile + create mode 100644 test/Makemodule.am + create mode 100644 tools/Makemodule.am + create mode 100644 tools/chacl.c + create mode 100644 tools/do_set.c + create mode 100644 tools/do_set.h + create mode 100644 tools/getfacl.c + create mode 100644 tools/parse.c + create mode 100644 tools/parse.h + create mode 100644 tools/sequence.c + create mode 100644 tools/sequence.h + create mode 100644 tools/setfacl.c + create mode 100644 tools/user_group.c + create mode 100644 tools/user_group.h + +diff --git a/.gitignore b/.gitignore +index 71009b9..d907d15 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,36 +1,46 @@ ++*~ + *.la + *.lo + *.mo + *.o +-*[-.]manifest ++.dirstamp ++.deps/ + .libs/ +-/.census ++ + /Logs/ ++ + /acl-* ++/chacl ++/getfacl ++/setfacl ++ ++/ABOUT-NLS + /aclocal.m4 + /autom4te.cache/ +-/chacl/chacl ++/ar-lib ++/config.cache + /config.guess + /config.log ++/config.rpath + /config.status + /config.sub + /configure +-/doc/CHANGES.gz +-/getfacl/getfacl ++/compile ++/depcomp ++/install-sh ++/libtool ++/ltmain.sh ++/m4/ ++/missing ++/test-driver ++Makefile ++Makefile.in ++stamp-h1 ++ ++*.log ++*.trs ++ + /include/acl +-/include/builddefs + /include/config.h ++/include/config.h.in + /include/sys +-/libtool +-/ltmain.sh +-/po/acl.pot +-/setfacl/setfacl +-acl-*.tar.gz +-install-sh +-m4/libtool.m4 +-m4/ltoptions.m4 +-m4/ltsugar.m4 +-m4/ltversion.m4 +-m4/lt~obsolete.m4 +-config.h.in +-*~ +diff --git a/Makefile b/Makefile +deleted file mode 100644 +index 235736e..0000000 +--- a/Makefile ++++ /dev/null +@@ -1,115 +0,0 @@ +-# +-# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = . +-HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no) +- +-ifeq ($(HAVE_BUILDDEFS), yes) +-include $(TOPDIR)/include/builddefs +-endif +- +-CONFIGURE = \ +- aclocal.m4 \ +- configure config.guess config.sub \ +- ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ +- m4/ltversion.m4 m4/lt~obsolete.m4 +-LSRCFILES = \ +- configure.ac Makepkgs install-sh exports README VERSION \ +- $(CONFIGURE) +- +-LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ +- Logs/* built .census install.* install-dev.* install-lib.* *.gz +- +-LIB_SUBDIRS = include libmisc libacl +-TOOL_SUBDIRS = getfacl setfacl chacl m4 man doc po test examples package +- +-SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +- +-default: include/builddefs include/config.h +-ifeq ($(HAVE_BUILDDEFS), no) +- $(MAKE) -C . $@ +-else +- $(MAKE) $(SUBDIRS) +-endif +- +-# tool/lib dependencies +-libacl: libmisc +-getfacl setfacl chacl: libacl +- +-ifeq ($(HAVE_BUILDDEFS), yes) +-include $(BUILDRULES) +-else +-clean: # if configure hasn't run, nothing to clean +-endif +- +-# Recent versions of libtool require the -i option for copying auxiliary +-# files (config.sub, config.guess, install-sh, ltmain.sh), while older +-# versions will copy those files anyway, and don't understand -i. +-LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i` +- +-configure include/builddefs: +- libtoolize -c $(LIBTOOLIZE_INSTALL) -f +- cp include/install-sh . +- aclocal -I m4 +- autoconf +- ./configure \ +- --prefix=/ \ +- --exec-prefix=/ \ +- --sbindir=/bin \ +- --bindir=/usr/bin \ +- --libdir=/lib \ +- --libexecdir=/usr/lib \ +- --enable-lib64=yes \ +- --includedir=/usr/include \ +- --mandir=/usr/share/man \ +- --datadir=/usr/share \ +- $$LOCAL_CONFIGURE_OPTIONS +- touch .census +- +-include/config.h: include/builddefs +-## Recover from the removal of $@ +- @if test -f $@; then :; else \ +- rm -f include/builddefs; \ +- $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ +- fi +- +-install: default $(addsuffix -install,$(SUBDIRS)) +- $(INSTALL) -m 755 -d $(PKG_DOC_DIR) +- $(INSTALL) -m 644 README $(PKG_DOC_DIR) +- +-install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) +- +-install-lib: default $(addsuffix -install-lib,$(SUBDIRS)) +- +-%-install: +- $(MAKE) -C $* install +- +-%-install-lib: +- $(MAKE) -C $* install-lib +- +-%-install-dev: +- $(MAKE) -C $* install-dev +- +-realclean distclean: clean +- rm -f $(LDIRT) $(CONFIGURE) +- rm -f include/builddefs include/config.h install-sh libtool +- rm -rf autom4te.cache Logs +- +-.PHONY: tests root-tests nfs-tests +-tests root-tests nfs-tests: default +- $(MAKE) -C test/ $@ +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +index 0000000..40d6ae5 +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1,32 @@ ++ACLOCAL_AMFLAGS = -I m4 ++ ++EXTRA_DIST = \ ++ exports ++ ++SUBDIRS = po ++ ++AM_CPPFLAGS = \ ++ -I$(top_builddir)/include \ ++ -I$(top_srcdir)/include \ ++ -DLOCALEDIR=\"$(localedir)\" ++ ++aclincludedir = $(includedir)/acl ++sysincludedir = $(includedir)/sys ++ ++aclinclude_HEADERS = ++sysinclude_HEADERS = ++bin_PROGRAMS = ++lib_LTLIBRARIES = ++noinst_HEADERS = ++noinst_LTLIBRARIES = ++dist_doc_DATA = ++dist_man_MANS = ++ ++include doc/Makemodule.am ++include examples/Makemodule.am ++include include/Makemodule.am ++include libacl/Makemodule.am ++include libmisc/Makemodule.am ++include man/Makemodule.am ++include test/Makemodule.am ++include tools/Makemodule.am +diff --git a/Makepkgs b/Makepkgs +deleted file mode 100755 +index 52368f4..0000000 +--- a/Makepkgs ++++ /dev/null +@@ -1,80 +0,0 @@ +-#! /bin/sh +-# +-# Copyright (C) 2001, 2002, 2003 Silicon Graphics, Inc. All rights reserved. +-# +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see . +-# +-LOGDIR=Logs +- +-verbose=false +- +-MAKE=${MAKE:-make} +-test ! -z "$MAKE" && make=$MAKE +- +-for opt in $* +-do +- case "$opt" in +- clean) +- ;; # ignored, kept for backward compatibility +- verbose) +- verbose=true ;; +- *) +- echo "Usage: Makepkgs [verbose]"; exit 1 ;; +- esac +-done +- +-# start with a clean manifest +-test ! -d $LOGDIR && mkdir $LOGDIR +-rm -rf $LOGDIR/* > /dev/null 2>&1 +- +-# build Debian packages, cleans itself before starting +-SUDO=${SUDO:-sudo} +-test ! -z "$SUDO" && sudo=$SUDO +- +-# build packages - manual clean before starting +-echo "== clean, log is $LOGDIR/clean" +-if $verbose ; then +- $MAKE clean 2>&1 | tee $LOGDIR/clean +-else +- $MAKE clean > $LOGDIR/clean 2>&1 || exit 1 +-fi +- +-echo +-echo "== configure, log is $LOGDIR/configure" +-rm -f .census # force configure to run here +-if $verbose ; then +- $MAKE configure 2>&1 | tee $LOGDIR/configure +-else +- $MAKE configure > $LOGDIR/configure 2>&1 || exit 1 +-fi +- +-echo +-echo "== default, log is $LOGDIR/default" +-if $verbose ; then +- $MAKE default 2>&1 | tee $LOGDIR/default +-else +- $MAKE default > $LOGDIR/default 2>&1 || exit 1 +-fi +- +-echo +-echo "== dist, log is $LOGDIR/dist" +-[ ! -f .census ] && touch .census +-if $verbose ; then +- $MAKE -C package dist 2>&1 | tee $LOGDIR/dist +-else +- $MAKE -C package dist > $LOGDIR/dist 2>&1 || exit 1 +- grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///' +-fi +- +-exit 0 +diff --git a/VERSION b/VERSION +deleted file mode 100644 +index 245aaf4..0000000 +--- a/VERSION ++++ /dev/null +@@ -1,7 +0,0 @@ +-# +-# This file is used by configure to get version information +-# +-PKG_MAJOR=2 +-PKG_MINOR=2 +-PKG_REVISION=52 +-PKG_BUILD=1 +diff --git a/autogen.sh b/autogen.sh +new file mode 100755 +index 0000000..a98a3c5 +--- /dev/null ++++ b/autogen.sh +@@ -0,0 +1,4 @@ ++#!/bin/sh -ex ++po/update-potfiles ++autopoint --force ++exec autoreconf -f -i +diff --git a/chacl/Makefile b/chacl/Makefile +deleted file mode 100644 +index 33858d6..0000000 +--- a/chacl/Makefile ++++ /dev/null +@@ -1,35 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LTCOMMAND = chacl +-CFILES = chacl.c +- +-LLDLIBS = $(LIBACL) $(LIBATTR) +-LTDEPENDENCIES = $(LIBACL) +- +-default: $(LTCOMMAND) +- +-include $(BUILDRULES) +- +-install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) +-install-dev install-lib: +diff --git a/chacl/chacl.c b/chacl/chacl.c +deleted file mode 100644 +index 525a7ff..0000000 +--- a/chacl/chacl.c ++++ /dev/null +@@ -1,354 +0,0 @@ +-/* +- * Copyright (c) 2001-2002 Silicon Graphics, Inc. +- * All Rights Reserved. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by +- * the Free Software Foundation, either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it would be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +- */ +- +-#include "config.h" +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "misc.h" +- +-static int acl_delete_file (const char * path, acl_type_t type); +-static int list_acl(char *file); +-static int set_acl(acl_t acl, acl_t dacl, const char *fname); +-static int walk_dir(acl_t acl, acl_t dacl, const char *fname); +- +-static char *program; +-static int rflag; +- +-static void +-usage(void) +-{ +- fprintf(stderr, _("Usage:\n")); +- fprintf(stderr, _("\t%s acl pathname...\n"), program); +- fprintf(stderr, _("\t%s -b acl dacl pathname...\n"), program); +- fprintf(stderr, _("\t%s -d dacl pathname...\n"), program); +- fprintf(stderr, _("\t%s -R pathname...\n"), program); +- fprintf(stderr, _("\t%s -D pathname...\n"), program); +- fprintf(stderr, _("\t%s -B pathname...\n"), program); +- fprintf(stderr, _("\t%s -l pathname...\t[not IRIX compatible]\n"), +- program); +- fprintf(stderr, _("\t%s -r pathname...\t[not IRIX compatible]\n"), +- program); +- exit(1); +-} +- +-int +-main(int argc, char *argv[]) +-{ +- char *file; +- int switch_flag = 0; /* ensure only one switch is used */ +- int args_required = 2; +- int failed = 0; /* exit status */ +- int c; /* For use by getopt(3) */ +- int dflag = 0; /* a Default ACL is desired */ +- int bflag = 0; /* a both ACLs are desired */ +- int Rflag = 0; /* set to true to remove an acl */ +- int Dflag = 0; /* set to true to remove default acls */ +- int Bflag = 0; /* set to true to remove both acls */ +- int lflag = 0; /* set to true to list acls */ +- acl_t acl = NULL; /* File ACL */ +- acl_t dacl = NULL; /* Directory Default ACL */ +- +- program = basename(argv[0]); +- +- setlocale(LC_CTYPE, ""); +- setlocale(LC_MESSAGES, ""); +- bindtextdomain(PACKAGE, LOCALEDIR); +- textdomain(PACKAGE); +- +- /* parse arguments */ +- while ((c = getopt(argc, argv, "bdlRDBr")) != -1) { +- if (switch_flag) +- usage(); +- switch_flag = 1; +- +- switch (c) { +- case 'b': +- bflag = 1; +- args_required = 3; +- break; +- case 'd': +- dflag = 1; +- args_required = 2; +- break; +- case 'R': +- Rflag = 1; +- args_required = 1; +- break; +- case 'D': +- Dflag = 1; +- args_required = 1; +- break; +- case 'B': +- Bflag = 1; +- args_required = 1; +- break; +- case 'l': +- lflag = 1; +- args_required = 1; +- break; +- case 'r': +- rflag = 1; +- args_required = 1; +- break; +- default: +- usage(); +- break; +- } +- } +- +- /* if not enough arguments quit */ +- if ((argc - optind) < args_required) +- usage(); +- +- /* list the acls */ +- if (lflag) { +- for (; optind < argc; optind++) { +- file = argv[optind]; +- if (!list_acl(file)) +- failed++; +- } +- return(failed); +- } +- +- /* remove the acls */ +- if (Rflag || Dflag || Bflag) { +- for (; optind < argc; optind++) { +- file = argv[optind]; +- if (!Dflag && +- (acl_delete_file(file, ACL_TYPE_ACCESS) == -1)) { +- fprintf(stderr, _( +- "%s: error removing access acl on \"%s\": %s\n"), +- program, file, strerror(errno)); +- failed++; +- } +- if (!Rflag && +- (acl_delete_file(file, ACL_TYPE_DEFAULT) == -1)) { +- fprintf(stderr, _( +- "%s: error removing default acl on \"%s\": %s\n"), +- program, file, strerror(errno)); +- failed++; +- } +- } +- return(failed); +- } +- +- /* file access acl */ +- if (! dflag) { +- acl = acl_from_text(argv[optind]); +- failed = acl_check(acl, &c); +- if (failed < 0) { +- fprintf(stderr, "%s: %s - %s\n", +- program, argv[optind], strerror(errno)); +- return 1; +- } +- else if (failed > 0) { +- fprintf(stderr, _( +- "%s: access ACL '%s': %s at entry %d\n"), +- program, argv[optind], acl_error(failed), c); +- return 1; +- } +- optind++; +- } +- +- +- /* directory default acl */ +- if (bflag || dflag) { +- dacl = acl_from_text(argv[optind]); +- failed = acl_check(dacl, &c); +- if (failed < 0) { +- fprintf(stderr, "%s: %s - %s\n", +- program, argv[optind], strerror(errno)); +- return 1; +- } +- else if (failed > 0) { +- fprintf(stderr, _( +- "%s: access ACL '%s': %s at entry %d\n"), +- program, argv[optind], acl_error(failed), c); +- return 1; +- } +- optind++; +- } +- +- /* place acls on files */ +- for (; optind < argc; optind++) +- failed += set_acl(acl, dacl, argv[optind]); +- +- if (acl) +- acl_free(acl); +- if (dacl) +- acl_free(dacl); +- +- return(failed); +-} +- +-/* +- * deletes an access acl or directory default acl if one exists +- */ +-static int +-acl_delete_file(const char *path, acl_type_t type) +-{ +- int error = 0; +- +- /* converts access ACL to a minimal ACL */ +- if (type == ACL_TYPE_ACCESS) { +- acl_t acl; +- acl_entry_t entry; +- acl_tag_t tag; +- +- acl = acl_get_file(path, ACL_TYPE_ACCESS); +- if (!acl) +- return -1; +- error = acl_get_entry(acl, ACL_FIRST_ENTRY, &entry); +- while (error == 1) { +- acl_get_tag_type(entry, &tag); +- switch(tag) { +- case ACL_USER: +- case ACL_GROUP: +- case ACL_MASK: +- acl_delete_entry(acl, entry); +- break; +- } +- error = acl_get_entry(acl, ACL_NEXT_ENTRY, &entry); +- } +- if (!error) +- error = acl_set_file(path, ACL_TYPE_ACCESS, acl); +- } else +- error = acl_delete_def_file(path); +- return(error); +-} +- +-/* +- * lists the acl for a file/dir in short text form +- * return 0 on failure +- * return 1 on success +- */ +-static int +-list_acl(char *file) +-{ +- acl_t acl = NULL; +- acl_t dacl = NULL; +- char *acl_text, *dacl_text = NULL; +- +- if ((acl = acl_get_file(file, ACL_TYPE_ACCESS)) == NULL) { +- fprintf(stderr, _("%s: cannot get access ACL on '%s': %s\n"), +- program, file, strerror(errno)); +- return 0; +- } +- if ((dacl = acl_get_file(file, ACL_TYPE_DEFAULT)) == NULL && +- (errno != EACCES)) { /* EACCES given if not a directory */ +- fprintf(stderr, _("%s: cannot get default ACL on '%s': %s\n"), +- program, file, strerror(errno)); +- return 0; +- } +- acl_text = acl_to_any_text(acl, NULL, ',', TEXT_ABBREVIATE); +- if (acl_text == NULL) { +- fprintf(stderr, _("%s: cannot get access ACL text on " +- "'%s': %s\n"), program, file, strerror(errno)); +- return 0; +- } +- if (acl_entries(dacl) > 0) { +- dacl_text = acl_to_any_text(dacl, NULL, ',', TEXT_ABBREVIATE); +- if (dacl_text == NULL) { +- fprintf(stderr, _("%s: cannot get default ACL text on " +- "'%s': %s\n"), program, file, strerror(errno)); +- return 0; +- } +- } +- if (dacl_text) { +- printf("%s [%s/%s]\n", file, acl_text, dacl_text); +- acl_free(dacl_text); +- } else +- printf("%s [%s]\n", file, acl_text); +- acl_free(acl_text); +- acl_free(acl); +- acl_free(dacl); +- return 1; +-} +- +-static int +-set_acl(acl_t acl, acl_t dacl, const char *fname) +-{ +- int failed = 0; +- +- if (rflag) +- failed += walk_dir(acl, dacl, fname); +- +- /* set regular acl */ +- if (acl && acl_set_file(fname, ACL_TYPE_ACCESS, acl) == -1) { +- fprintf(stderr, _("%s: cannot set access acl on \"%s\": %s\n"), +- program, fname, strerror(errno)); +- failed++; +- } +- /* set default acl */ +- if (dacl && acl_set_file(fname, ACL_TYPE_DEFAULT, dacl) == -1) { +- fprintf(stderr, _("%s: cannot set default acl on \"%s\": %s\n"), +- program, fname, strerror(errno)); +- failed++; +- } +- +- return(failed); +-} +- +-static int +-walk_dir(acl_t acl, acl_t dacl, const char *fname) +-{ +- int failed = 0; +- DIR *dir; +- struct dirent64 *d; +- char *name; +- +- if ((dir = opendir(fname)) == NULL) { +- if (errno != ENOTDIR) { +- fprintf(stderr, _("%s: opendir failed: %s\n"), +- program, strerror(errno)); +- return(1); +- } +- return(0); /* got a file, not an error */ +- } +- +- while ((d = readdir64(dir)) != NULL) { +- /* skip "." and ".." entries */ +- if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0) +- continue; +- +- name = malloc(strlen(fname) + strlen(d->d_name) + 2); +- if (name == NULL) { +- fprintf(stderr, _("%s: malloc failed: %s\n"), +- program, strerror(errno)); +- exit(1); +- } +- sprintf(name, "%s/%s", fname, d->d_name); +- +- failed += set_acl(acl, dacl, name); +- free(name); +- } +- closedir(dir); +- +- return(failed); +-} +diff --git a/configure.ac b/configure.ac +index 7af2e8d..1ca2a3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,37 +13,53 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # +-AC_INIT(include/acl.h) ++ ++AC_INIT([acl], [2.2.53], [acl-devel@nongnu.org]) + AC_CONFIG_AUX_DIR([.]) + AC_CONFIG_MACRO_DIR([m4]) +-AC_CONFIG_HEADER(include/config.h) ++AC_CONFIG_HEADER([include/config.h]) + AC_PREFIX_DEFAULT(/usr) + +-AC_PROG_LIBTOOL ++AM_INIT_AUTOMAKE([-Wall foreign 1.11 dist-xz subdir-objects]) ++AM_SILENT_RULES([yes]) ++ ++AC_PROG_CC ++AM_PROG_CC_C_O ++AC_USE_SYSTEM_EXTENSIONS ++AC_FUNC_GCC_VISIBILITY ++ ++AM_PROG_AR ++LT_INIT + +-AC_ARG_ENABLE(shared, +-[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],, +- enable_shared=yes) +-AC_SUBST(enable_shared) ++AM_GNU_GETTEXT_VERSION([0.18.2]) ++AM_GNU_GETTEXT([external]) + +-AC_ARG_ENABLE(gettext, +-[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, +- enable_gettext=yes) +-AC_SUBST(enable_gettext) ++AC_ARG_ENABLE([debug], ++ [AS_HELP_STRING([--enable-debug], [Enable extra debugging])]) ++AS_IF([test "x$enable_debug" = "xyes"], ++ [CPPFLAGS="$CPPFLAGS -DDEBUG"], ++ [CPPFLAGS="$CPPFLAGS -DNDEBUG"]) + +-AC_ARG_ENABLE(lib64, +-[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, +- enable_lib64=no) +-AC_SUBST(enable_lib64) ++dnl Automatically increment the revision for every release. ++LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .) ++AC_SUBST(LT_REVISION) + +-AC_PACKAGE_GLOBALS(acl) +-AC_PACKAGE_UTILITIES(acl) + AC_PACKAGE_NEED_ATTR_XATTR_H + AC_PACKAGE_NEED_ATTR_ERROR_H +-AC_MULTILIB($enable_lib64) + AC_PACKAGE_NEED_GETXATTR_LIBATTR +-AC_MANUAL_FORMAT +- +-AC_FUNC_GCC_VISIBILITY + +-AC_OUTPUT(include/builddefs) ++AC_CONFIG_COMMANDS([include/acl], ++ [dnl ++ rm -rf include/acl ++ $as_ln_s "$ac_abs_top_srcdir/include" include/acl ++ ]) ++AC_CONFIG_COMMANDS([include/sys], ++ [dnl ++ rm -rf include/sys ++ $as_ln_s "$ac_abs_top_srcdir/include" include/sys ++ ]) ++AC_CONFIG_FILES([ ++ Makefile ++ po/Makefile.in ++]) ++AC_OUTPUT +diff --git a/doc/Makefile b/doc/Makefile +deleted file mode 100644 +index a08e403..0000000 +--- a/doc/Makefile ++++ /dev/null +@@ -1,42 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LSRCFILES = extensions.txt libacl.txt TODO PORTING CHANGES COPYING COPYING.LGPL INSTALL \ +- old-acl.5 +-LDIRT = *.gz +- +-default: CHANGES.gz +- +-include $(BUILDRULES) +- +-CHANGES.gz: +- $(ZIP) --best -c < CHANGES > $@ +- +-install: default +- $(INSTALL) -m 755 -d $(PKG_DOC_DIR) +- $(INSTALL) -m 644 PORTING CHANGES.gz $(PKG_DOC_DIR) +-ifeq ($(PKG_DISTRIBUTION), debian) +- $(INSTALL) -S CHANGES.gz $(PKG_DOC_DIR)/changelog.gz +-else +- $(INSTALL) -m 644 COPYING COPYING.LGPL $(PKG_DOC_DIR) +-endif +- +-install-dev install-lib: +diff --git a/doc/Makemodule.am b/doc/Makemodule.am +new file mode 100644 +index 0000000..1b9c165 +--- /dev/null ++++ b/doc/Makemodule.am +@@ -0,0 +1,10 @@ ++dist_doc_DATA += \ ++ doc/extensions.txt \ ++ doc/CHANGES \ ++ doc/COPYING \ ++ doc/COPYING.LGPL \ ++ doc/libacl.txt \ ++ doc/PORTING ++ ++EXTRA_DIST += \ ++ doc/TODO +diff --git a/doc/TODO b/doc/TODO +index 9c23d69..b376a65 100644 +--- a/doc/TODO ++++ b/doc/TODO +@@ -1,4 +1,2 @@ +-- include po (gettext stuff) in packages and build process +-- fix build process + - check documentation + - add manual pages for POSIX functions +diff --git a/examples/Makefile b/examples/Makefile +index c6aa124..74642ca 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -1,27 +1,9 @@ +-# +-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# ++CFLAGS = -g -Wall -I../include ++LDFLAGS = -lacl + +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs ++PROGS = get-acl copy-acl set-acl copyperm + +-LSRCFILES = README Makefile.examples get-acl.c set-acl.c copy-acl.c copyperm.c +-LDIRT = get-acl set-acl copy-acl ++all: $(PROGS) + +-include $(BUILDRULES) +- +-default install install-dev install-lib: ++clean: ++ rm -f $(PROGS) +diff --git a/examples/Makefile.examples b/examples/Makefile.examples +deleted file mode 100644 +index b33c2a5..0000000 +--- a/examples/Makefile.examples ++++ /dev/null +@@ -1,9 +0,0 @@ +-CFLAGS = -g -Wall +-LDFLAGS = -lacl +- +-PROGS = get-acl copy-acl set-acl copyperm +- +-all: $(PROGS) +- +-clean: +- rm -f $(PROGS) +diff --git a/examples/Makemodule.am b/examples/Makemodule.am +new file mode 100644 +index 0000000..e18991a +--- /dev/null ++++ b/examples/Makemodule.am +@@ -0,0 +1,7 @@ ++EXTRA_DIST += \ ++ examples/copy-acl.c \ ++ examples/copyperm.c \ ++ examples/get-acl.c \ ++ examples/Makefile \ ++ examples/README \ ++ examples/set-acl.c +diff --git a/getfacl/Makefile b/getfacl/Makefile +deleted file mode 100644 +index 7fbafda..0000000 +--- a/getfacl/Makefile ++++ /dev/null +@@ -1,36 +0,0 @@ +-# +-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LTCOMMAND = getfacl +-CFILES = getfacl.c user_group.c +-HFILES = user_group.h +- +-LLDLIBS = $(LIBMISC) $(LIBACL) $(LIBATTR) +-LTDEPENDENCIES = $(LIBMISC) $(LIBACL) +- +-default: $(LTCOMMAND) +- +-include $(BUILDRULES) +- +-install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) +-install-dev install-lib: +diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c +deleted file mode 100644 +index 22cc1c7..0000000 +--- a/getfacl/getfacl.c ++++ /dev/null +@@ -1,747 +0,0 @@ +-/* +- File: getfacl.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999-2002 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 2 of the License, or (at +- your option) any later version. +- +- This program is distributed in the hope that it will be useful, but +- WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- USA. +-*/ +- +-#include "config.h" +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "misc.h" +-#include "user_group.h" +-#include "walk_tree.h" +- +-#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT" +- +-#if !POSIXLY_CORRECT +-# define CMD_LINE_OPTIONS "aceEsRLPtpndvh" +-#endif +-#define POSIXLY_CMD_LINE_OPTIONS "d" +- +-struct option long_options[] = { +-#if !POSIXLY_CORRECT +- { "access", 0, 0, 'a' }, +- { "omit-header", 0, 0, 'c' }, +- { "all-effective", 0, 0, 'e' }, +- { "no-effective", 0, 0, 'E' }, +- { "skip-base", 0, 0, 's' }, +- { "recursive", 0, 0, 'R' }, +- { "logical", 0, 0, 'L' }, +- { "physical", 0, 0, 'P' }, +- { "tabular", 0, 0, 't' }, +- { "absolute-names", 0, 0, 'p' }, +- { "numeric", 0, 0, 'n' }, +-#endif +- { "default", 0, 0, 'd' }, +- { "version", 0, 0, 'v' }, +- { "help", 0, 0, 'h' }, +- { NULL, 0, 0, 0 } +-}; +- +-const char *progname; +-const char *cmd_line_options; +- +-int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL; +-int opt_print_acl; +-int opt_print_default_acl; +-int opt_strip_leading_slash = 1; +-int opt_comments = 1; /* include comments */ +-int opt_skip_base; /* skip files that only have the base entries */ +-int opt_tabular; /* tabular output format (alias `showacl') */ +-#if POSIXLY_CORRECT +-const int posixly_correct = 1; /* Posix compatible behavior! */ +-#else +-int posixly_correct; /* Posix compatible behavior? */ +-#endif +-int had_errors; +-int absolute_warning; /* Absolute path warning was issued */ +-int print_options = TEXT_SOME_EFFECTIVE; +-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); +- if (q == NULL) { +- fprintf(stderr, "%s: %s\n", progname, strerror(errno)); +- exit(1); +- } +- return q; +-} +- +-struct name_list { +- struct name_list *next; +- char name[0]; +-}; +- +-void free_list(struct name_list *names) +-{ +- struct name_list *next; +- +- while (names) { +- next = names->next; +- free(names); +- names = next; +- } +-} +- +-struct name_list *get_list(const struct stat *st, acl_t acl) +-{ +- struct name_list *first = NULL, *last = NULL; +- acl_entry_t ent; +- int ret = 0; +- +- if (acl != NULL) +- ret = acl_get_entry(acl, ACL_FIRST_ENTRY, &ent); +- if (ret != 1) +- return NULL; +- while (ret > 0) { +- acl_tag_t e_type; +- const id_t *id_p; +- const char *name = ""; +- int len; +- +- acl_get_tag_type(ent, &e_type); +- switch(e_type) { +- case ACL_USER_OBJ: +- name = user_name(st->st_uid, opt_numeric); +- break; +- +- case ACL_USER: +- id_p = acl_get_qualifier(ent); +- if (id_p != NULL) +- name = user_name(*id_p, opt_numeric); +- break; +- +- case ACL_GROUP_OBJ: +- name = group_name(st->st_gid, opt_numeric); +- break; +- +- case ACL_GROUP: +- id_p = acl_get_qualifier(ent); +- if (id_p != NULL) +- name = group_name(*id_p, opt_numeric); +- break; +- } +- name = xquote(name, "\t\n\r"); +- len = strlen(name); +- if (last == NULL) { +- first = last = (struct name_list *) +- malloc(sizeof(struct name_list) + len + 1); +- } else { +- last->next = (struct name_list *) +- malloc(sizeof(struct name_list) + len + 1); +- last = last->next; +- } +- if (last == NULL) { +- free_list(first); +- return NULL; +- } +- last->next = NULL; +- strcpy(last->name, name); +- +- ret = acl_get_entry(acl, ACL_NEXT_ENTRY, &ent); +- } +- return first; +-} +- +-int max_name_length(struct name_list *names) +-{ +- int max_len = 0; +- while (names != NULL) { +- struct name_list *next = names->next; +- int len = strlen(names->name); +- +- if (len > max_len) +- max_len = len; +- names = next; +- } +- return max_len; +-} +- +-int names_width; +- +-struct acl_perm_def { +- acl_tag_t tag; +- char c; +-}; +- +-struct acl_perm_def acl_perm_defs[] = { +- { ACL_READ, 'r' }, +- { ACL_WRITE, 'w' }, +- { ACL_EXECUTE, 'x' }, +- { 0, 0 } +-}; +- +-#define ACL_PERMS (sizeof(acl_perm_defs) / sizeof(struct acl_perm_def) - 1) +- +-void acl_perm_str(acl_entry_t entry, char *str) +-{ +- acl_permset_t permset; +- int n; +- +- acl_get_permset(entry, &permset); +- for (n = 0; n < (int) ACL_PERMS; n++) { +- str[n] = (acl_get_perm(permset, acl_perm_defs[n].tag) ? +- acl_perm_defs[n].c : '-'); +- } +- str[n] = '\0'; +-} +- +-void acl_mask_perm_str(acl_t acl, char *str) +-{ +- acl_entry_t entry; +- +- str[0] = '\0'; +- if (acl_get_entry(acl, ACL_FIRST_ENTRY, &entry) != 1) +- return; +- for(;;) { +- acl_tag_t tag; +- +- acl_get_tag_type(entry, &tag); +- if (tag == ACL_MASK) { +- acl_perm_str(entry, str); +- return; +- } +- if (acl_get_entry(acl, ACL_NEXT_ENTRY, &entry) != 1) +- return; +- } +-} +- +-void apply_mask(char *perm, const char *mask) +-{ +- while (*perm) { +- if (*mask == '-' && *perm >= 'a' && *perm <= 'z') +- *perm = *perm - 'a' + 'A'; +- perm++; +- if (*mask) +- mask++; +- } +-} +- +-int show_line(FILE *stream, struct name_list **acl_names, acl_t acl, +- acl_entry_t *acl_ent, const char *acl_mask, +- struct name_list **dacl_names, acl_t dacl, +- acl_entry_t *dacl_ent, const char *dacl_mask) +-{ +- acl_tag_t tag_type; +- const char *tag, *name; +- char acl_perm[ACL_PERMS+1], dacl_perm[ACL_PERMS+1]; +- +- if (acl) { +- acl_get_tag_type(*acl_ent, &tag_type); +- name = (*acl_names)->name; +- } else { +- acl_get_tag_type(*dacl_ent, &tag_type); +- name = (*dacl_names)->name; +- } +- +- switch(tag_type) { +- case ACL_USER_OBJ: +- tag = "USER"; +- break; +- case ACL_USER: +- tag = "user"; +- break; +- case ACL_GROUP_OBJ: +- tag = "GROUP"; +- break; +- case ACL_GROUP: +- tag = "group"; +- break; +- case ACL_MASK: +- tag = "mask"; +- break; +- case ACL_OTHER: +- tag = "other"; +- break; +- default: +- return -1; +- } +- +- memset(acl_perm, ' ', ACL_PERMS); +- acl_perm[ACL_PERMS] = '\0'; +- if (acl_ent) { +- acl_perm_str(*acl_ent, acl_perm); +- if (tag_type != ACL_USER_OBJ && tag_type != ACL_OTHER && +- tag_type != ACL_MASK) +- apply_mask(acl_perm, acl_mask); +- } +- memset(dacl_perm, ' ', ACL_PERMS); +- dacl_perm[ACL_PERMS] = '\0'; +- if (dacl_ent) { +- acl_perm_str(*dacl_ent, dacl_perm); +- if (tag_type != ACL_USER_OBJ && tag_type != ACL_OTHER && +- tag_type != ACL_MASK) +- apply_mask(dacl_perm, dacl_mask); +- } +- +- fprintf(stream, "%-5s %*s %*s %*s\n", +- tag, -names_width, name, +- -(int)ACL_PERMS, acl_perm, +- -(int)ACL_PERMS, dacl_perm); +- +- if (acl_names) { +- acl_get_entry(acl, ACL_NEXT_ENTRY, acl_ent); +- (*acl_names) = (*acl_names)->next; +- } +- if (dacl_names) { +- acl_get_entry(dacl, ACL_NEXT_ENTRY, dacl_ent); +- (*dacl_names) = (*dacl_names)->next; +- } +- return 0; +-} +- +-int do_show(FILE *stream, const char *path_p, const struct stat *st, +- acl_t acl, acl_t dacl) +-{ +- struct name_list *acl_names = get_list(st, acl), +- *first_acl_name = acl_names; +- struct name_list *dacl_names = get_list(st, dacl), +- *first_dacl_name = dacl_names; +- +- int acl_names_width = max_name_length(acl_names); +- int dacl_names_width = max_name_length(dacl_names); +- acl_entry_t acl_ent; +- acl_entry_t dacl_ent; +- char acl_mask[ACL_PERMS+1], dacl_mask[ACL_PERMS+1]; +- int ret; +- +- names_width = 8; +- if (acl_names_width > names_width) +- names_width = acl_names_width; +- if (dacl_names_width > names_width) +- names_width = dacl_names_width; +- +- acl_mask[0] = '\0'; +- if (acl) { +- acl_mask_perm_str(acl, acl_mask); +- ret = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_ent); +- if (ret == 0) +- acl = NULL; +- if (ret < 0) +- return ret; +- } +- dacl_mask[0] = '\0'; +- if (dacl) { +- acl_mask_perm_str(dacl, dacl_mask); +- ret = acl_get_entry(dacl, ACL_FIRST_ENTRY, &dacl_ent); +- if (ret == 0) +- dacl = NULL; +- if (ret < 0) +- return ret; +- } +- fprintf(stream, "# file: %s\n", xquote(path_p, "\n\r")); +- while (acl_names != NULL || dacl_names != NULL) { +- acl_tag_t acl_tag, dacl_tag; +- +- if (acl) +- acl_get_tag_type(acl_ent, &acl_tag); +- if (dacl) +- acl_get_tag_type(dacl_ent, &dacl_tag); +- +- if (acl && (!dacl || acl_tag < dacl_tag)) { +- show_line(stream, &acl_names, acl, &acl_ent, acl_mask, +- NULL, NULL, NULL, NULL); +- continue; +- } else if (dacl && (!acl || dacl_tag < acl_tag)) { +- show_line(stream, NULL, NULL, NULL, NULL, +- &dacl_names, dacl, &dacl_ent, dacl_mask); +- 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); +- +- if (acl && (!dacl || *acl_id_p < *dacl_id_p)) { +- 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)) { +- show_line(stream, NULL, NULL, NULL, +- NULL, &dacl_names, dacl, +- &dacl_ent, dacl_mask); +- continue; +- } +- } +- show_line(stream, &acl_names, acl, &acl_ent, acl_mask, +- &dacl_names, dacl, &dacl_ent, dacl_mask); +- } +- } +- +- free_list(first_acl_name); +- free_list(first_dacl_name); +- +- return 0; +-} +- +-/* +- * Create an ACL from the file permission bits +- * of the file PATH_P. +- */ +-static acl_t +-acl_get_file_mode(const char *path_p) +-{ +- struct stat st; +- +- if (stat(path_p, &st) != 0) +- return NULL; +- return acl_from_mode(st.st_mode); +-} +- +-static const char * +-flagstr(mode_t mode) +-{ +- static char str[4]; +- +- str[0] = (mode & S_ISUID) ? 's' : '-'; +- str[1] = (mode & S_ISGID) ? 's' : '-'; +- str[2] = (mode & S_ISVTX) ? 't' : '-'; +- str[3] = '\0'; +- return str; +-} +- +-int do_print(const char *path_p, const struct stat *st, int walk_flags, void *unused) +-{ +- const char *default_prefix = NULL; +- acl_t acl = NULL, default_acl = NULL; +- int error = 0; +- +- if (walk_flags & WALK_TREE_FAILED) { +- fprintf(stderr, "%s: %s: %s\n", progname, xquote(path_p, "\n\r"), +- strerror(errno)); +- return 1; +- } +- +- /* +- * Symlinks can never have ACLs, so when doing a physical walk, we +- * skip symlinks altogether, and when doing a half-logical walk, we +- * skip all non-toplevel symlinks. +- */ +- if ((walk_flags & WALK_TREE_SYMLINK) && +- ((walk_flags & WALK_TREE_PHYSICAL) || +- !(walk_flags & (WALK_TREE_TOPLEVEL | WALK_TREE_LOGICAL)))) +- return 0; +- +- if (opt_print_acl) { +- acl = acl_get_file(path_p, ACL_TYPE_ACCESS); +- if (acl == NULL && (errno == ENOSYS || errno == ENOTSUP)) +- acl = acl_get_file_mode(path_p); +- if (acl == NULL) +- goto fail; +- } +- +- if (opt_print_default_acl && S_ISDIR(st->st_mode)) { +- default_acl = acl_get_file(path_p, ACL_TYPE_DEFAULT); +- if (default_acl == NULL) { +- if (errno != ENOSYS && errno != ENOTSUP) +- goto fail; +- } else if (acl_entries(default_acl) == 0) { +- acl_free(default_acl); +- default_acl = NULL; +- } +- } +- +- if (opt_skip_base && +- (!acl || acl_equiv_mode(acl, NULL) == 0) && !default_acl) +- return 0; +- +- if (opt_print_acl && opt_print_default_acl) +- default_prefix = "default:"; +- +- if (opt_strip_leading_slash) { +- if (*path_p == '/') { +- if (!absolute_warning) { +- fprintf(stderr, _("%s: Removing leading " +- "'/' from absolute path names\n"), +- progname); +- absolute_warning = 1; +- } +- while (*path_p == '/') +- path_p++; +- } else if (*path_p == '.' && *(path_p+1) == '/') +- while (*++path_p == '/') +- /* nothing */ ; +- if (*path_p == '\0') +- path_p = "."; +- } +- +- if (opt_tabular) { +- if (do_show(stdout, path_p, st, acl, default_acl) != 0) +- goto fail; +- } else { +- if (opt_comments) { +- printf("# file: %s\n", xquote(path_p, "\n\r")); +- printf("# owner: %s\n", +- xquote(user_name(st->st_uid, opt_numeric), " \t\n\r")); +- printf("# group: %s\n", +- xquote(group_name(st->st_gid, opt_numeric), " \t\n\r")); +- if ((st->st_mode & (S_ISVTX | S_ISUID | S_ISGID)) && !posixly_correct) +- printf("# flags: %s\n", flagstr(st->st_mode)); +- } +- if (acl != NULL) { +- char *acl_text = acl_to_any_text(acl, NULL, '\n', +- print_options); +- if (!acl_text) +- goto fail; +- if (puts(acl_text) < 0) { +- acl_free(acl_text); +- goto fail; +- } +- acl_free(acl_text); +- } +- if (default_acl != NULL) { +- char *acl_text = acl_to_any_text(default_acl, +- default_prefix, '\n', +- print_options); +- if (!acl_text) +- goto fail; +- if (puts(acl_text) < 0) { +- acl_free(acl_text); +- goto fail; +- } +- acl_free(acl_text); +- } +- } +- if (acl || default_acl || opt_comments) +- printf("\n"); +- +-cleanup: +- if (acl) +- acl_free(acl); +- if (default_acl) +- acl_free(default_acl); +- return error; +- +-fail: +- fprintf(stderr, "%s: %s: %s\n", progname, xquote(path_p, "\n\r"), +- strerror(errno)); +- error = -1; +- goto cleanup; +-} +- +- +-void help(void) +-{ +- printf(_("%s %s -- get file access control lists\n"), +- progname, VERSION); +- printf(_("Usage: %s [-%s] file ...\n"), +- progname, cmd_line_options); +-#if !POSIXLY_CORRECT +- if (posixly_correct) { +-#endif +- printf(_( +-" -d, --default display the default access control list\n")); +-#if !POSIXLY_CORRECT +- } else { +- printf(_( +-" -a, --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" -c, --omit-header do not display the comment header\n" +-" -e, --all-effective print all effective rights\n" +-" -E, --no-effective print no effective rights\n" +-" -s, --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P, --physical physical walk, do not follow symbolic links\n" +-" -t, --tabular use tabular output format\n" +-" -n, --numeric print numeric user/group identifiers\n" +-" -p, --absolute-names don't strip leading '/' in pathnames\n")); +- } +-#endif +- printf(_( +-" -v, --version print version and exit\n" +-" -h, --help this help text\n")); +-} +- +-int main(int argc, char *argv[]) +-{ +- int opt; +- char *line; +- +- progname = basename(argv[0]); +- +-#if POSIXLY_CORRECT +- cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; +-#else +- if (getenv(POSIXLY_CORRECT_STR)) +- posixly_correct = 1; +- if (!posixly_correct) +- cmd_line_options = CMD_LINE_OPTIONS; +- else +- cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; +-#endif +- +- setlocale(LC_CTYPE, ""); +- setlocale(LC_MESSAGES, ""); +- bindtextdomain(PACKAGE, LOCALEDIR); +- textdomain(PACKAGE); +- +- /* Align `#effective:' comments to column 40 for tty's */ +- if (!posixly_correct && isatty(fileno(stdout))) +- print_options |= TEXT_SMART_INDENT; +- +- while ((opt = getopt_long(argc, argv, cmd_line_options, +- long_options, NULL)) != -1) { +- switch (opt) { +- case 'a': /* acl only */ +- if (posixly_correct) +- goto synopsis; +- opt_print_acl = 1; +- break; +- +- case 'd': /* default acl only */ +- opt_print_default_acl = 1; +- break; +- +- case 'c': /* no comments */ +- if (posixly_correct) +- goto synopsis; +- opt_comments = 0; +- break; +- +- case 'e': /* all #effective comments */ +- if (posixly_correct) +- goto synopsis; +- print_options |= TEXT_ALL_EFFECTIVE; +- break; +- +- case 'E': /* no #effective comments */ +- if (posixly_correct) +- goto synopsis; +- print_options &= ~(TEXT_SOME_EFFECTIVE | +- TEXT_ALL_EFFECTIVE); +- break; +- +- case 'R': /* recursive */ +- if (posixly_correct) +- goto synopsis; +- walk_flags |= WALK_TREE_RECURSIVE; +- break; +- +- case 'L': /* follow all symlinks */ +- if (posixly_correct) +- goto synopsis; +- walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE; +- walk_flags &= ~WALK_TREE_PHYSICAL; +- break; +- +- case 'P': /* skip all symlinks */ +- if (posixly_correct) +- goto synopsis; +- walk_flags |= WALK_TREE_PHYSICAL; +- walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE | +- WALK_TREE_DEREFERENCE_TOPLEVEL); +- break; +- +- case 's': /* skip files with only base entries */ +- if (posixly_correct) +- goto synopsis; +- opt_skip_base = 1; +- break; +- +- case 'p': +- if (posixly_correct) +- goto synopsis; +- opt_strip_leading_slash = 0; +- break; +- +- case 't': +- if (posixly_correct) +- goto synopsis; +- opt_tabular = 1; +- break; +- +- case 'n': /* numeric */ +- opt_numeric = 1; +- print_options |= TEXT_NUMERIC_IDS; +- break; +- +- case 'v': /* print version */ +- printf("%s " VERSION "\n", progname); +- return 0; +- +- case 'h': /* help */ +- help(); +- return 0; +- +- case ':': /* option missing */ +- case '?': /* unknown option */ +- default: +- goto synopsis; +- } +- } +- +- if (!(opt_print_acl || opt_print_default_acl)) { +- opt_print_acl = 1; +- if (!posixly_correct) +- opt_print_default_acl = 1; +- } +- +- if ((optind == argc) && !posixly_correct) +- goto synopsis; +- +- do { +- if (optind == argc || +- strcmp(argv[optind], "-") == 0) { +- while ((line = next_line(stdin)) != NULL) { +- if (*line == '\0') +- continue; +- +- had_errors += walk_tree(line, walk_flags, 0, +- do_print, NULL); +- } +- if (!feof(stdin)) { +- fprintf(stderr, _("%s: Standard input: %s\n"), +- progname, strerror(errno)); +- had_errors++; +- } +- } else +- had_errors += walk_tree(argv[optind], walk_flags, 0, +- do_print, NULL); +- optind++; +- } while (optind < argc); +- +- return had_errors ? 1 : 0; +- +-synopsis: +- fprintf(stderr, _("Usage: %s [-%s] file ...\n"), +- progname, cmd_line_options); +- fprintf(stderr, _("Try `%s --help' for more information.\n"), +- progname); +- return 2; +-} +- +diff --git a/getfacl/user_group.c b/getfacl/user_group.c +deleted file mode 100644 +index 61fa0c3..0000000 +--- a/getfacl/user_group.c ++++ /dev/null +@@ -1,59 +0,0 @@ +-/* +- File: user_group.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999, 2000 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 2 of the License, or (at +- your option) any later version. +- +- This program is distributed in the hope that it will be useful, but +- WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- USA. +-*/ +- +-#include +-#include +-#include "user_group.h" +- +- +-const char * +-user_name(uid_t uid, int numeric) +-{ +- struct passwd *passwd = numeric ? NULL : getpwuid(uid); +- static char uid_str[22]; +- int ret; +- +- if (passwd != NULL) +- return passwd->pw_name; +- ret = snprintf(uid_str, sizeof(uid_str), "%ld", (long)uid); +- if (ret < 1 || (size_t)ret >= sizeof(uid_str)) +- return "?"; +- return uid_str; +-} +- +- +-const char * +-group_name(gid_t gid, int numeric) +-{ +- struct group *group = numeric ? NULL : getgrgid(gid); +- static char gid_str[22]; +- int ret; +- +- if (group != NULL) +- return group->gr_name; +- ret = snprintf(gid_str, sizeof(gid_str), "%ld", (long)gid); +- if (ret < 1 || (size_t)ret >= sizeof(gid_str)) +- return "?"; +- return gid_str; +-} +- +diff --git a/getfacl/user_group.h b/getfacl/user_group.h +deleted file mode 100644 +index aad5846..0000000 +--- a/getfacl/user_group.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/* +- File: user_group.h +- (Linux Access Control List Management) +- +- Copyright (C) 1999 by Andreas Gruenbacher +- +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#include +-#include +-#include +- +-const char * +-user_name(uid_t uid, int numeric); +-const char * +-group_name(gid_t uid, int numeric); +- +diff --git a/include/Makefile b/include/Makefile +deleted file mode 100644 +index 328a61d..0000000 +--- a/include/Makefile ++++ /dev/null +@@ -1,40 +0,0 @@ +-# +-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-HFILES = acl.h libacl.h acl_ea.h misc.h walk_tree.h +-LSRCFILES = builddefs.in buildmacros buildrules config.h.in install-sh +-LDIRT = sys acl +- +-default: sys acl +- +-sys acl: +- $(LN_S) . $@ +- +-include $(BUILDRULES) +- +-install-dev: default +- $(INSTALL) -m 755 -d $(PKG_INC_DIR) +- $(INSTALL) -m 755 -d $(PKG_INC_DIR)/sys +- $(INSTALL) -m 644 acl.h $(PKG_INC_DIR)/sys/acl.h +- $(INSTALL) -m 755 -d $(PKG_INC_DIR)/acl +- $(INSTALL) -m 644 libacl.h $(PKG_INC_DIR)/acl/libacl.h +- +-install install-lib: +diff --git a/include/Makemodule.am b/include/Makemodule.am +new file mode 100644 +index 0000000..2596f5e +--- /dev/null ++++ b/include/Makemodule.am +@@ -0,0 +1,10 @@ ++aclinclude_HEADERS += \ ++ include/libacl.h ++ ++sysinclude_HEADERS += \ ++ include/acl.h ++ ++noinst_HEADERS += \ ++ include/acl_ea.h \ ++ include/misc.h \ ++ include/walk_tree.h +diff --git a/include/builddefs.in b/include/builddefs.in +deleted file mode 100644 +index 9ed15b4..0000000 +--- a/include/builddefs.in ++++ /dev/null +@@ -1,94 +0,0 @@ +-# +-# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. +-# +-# @configure_input@ +-# +- +-ifndef _BUILDDEFS_INCLUDED_ +-_BUILDDEFS_INCLUDED_ = 1 +- +-DEBUG = @debug_build@ +-OPTIMIZER = @opt_build@ +-MALLOCLIB = @malloc_lib@ +-LOADERFLAGS = @LDFLAGS@ +- +-LIBACL = $(TOPDIR)/libacl/libacl.la +-LIBATTR = @libattr@ +-LIBMISC = $(TOPDIR)/libmisc/libmisc.la +- +-prefix = @prefix@ +-exec_prefix = @exec_prefix@ +-top_builddir = @top_builddir@ +-datarootdir = @datarootdir@ +- +-PKG_NAME = @pkg_name@ +-PKG_USER = @pkg_user@ +-PKG_GROUP = @pkg_group@ +-PKG_RELEASE = @pkg_release@ +-PKG_VERSION = @pkg_version@ +-PKG_PLATFORM = @pkg_platform@ +-PKG_DISTRIBUTION= @pkg_distribution@ +-PKG_BIN_DIR = @bindir@ +-PKG_SBIN_DIR = @sbindir@ +-PKG_LIB_DIR = @libdir@@libdirsuffix@ +-PKG_DEVLIB_DIR = @libdir@@libdirsuffix@ +-PKG_INC_DIR = @includedir@ +-PKG_MAN_DIR = @mandir@ +-PKG_DOC_DIR = @datadir@/doc/@pkg_name@ +-PKG_LOCALE_DIR = @datadir@/locale +- +-CC = @cc@ +-AWK = @awk@ +-SED = @sed@ +-TAR = @tar@ +-ZIP = @zip@ +-MAKE = @make@ +-ECHO = @echo@ +-SORT = @sort@ +-LN_S = @LN_S@ +-SHELL = @SHELL@ +-LIBTOOL = @LIBTOOL@ +-MAKEDEPEND = @makedepend@ +- +-MSGFMT = @msgfmt@ +-MSGMERGE = @msgmerge@ +-XGETTEXT = @xgettext@ +- +-ENABLE_SHARED = @enable_shared@ +-ENABLE_GETTEXT = @enable_gettext@ +- +-HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ +- +-ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" "" +-PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 +-endif +- +-ifeq ($(PKG_PLATFORM),linux) +-DEPENDFLAGS = -D__linux__ +-endif +-ifeq ($(PKG_PLATFORM),darwin) +-DEPENDFLAGS = -D__APPLE__ +-endif +-ifeq ($(PKG_PLATFORM),irix) +-DEPENDFLAGS = -D__sgi__ +-endif +-ifeq ($(PKG_PLATFORM),freebsd) +-DEPENDFLAGS = -D__FreeBSD__ +-endif +- +-GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \ +- -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \ +- -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include +- +-# Global, Platform, Local CFLAGS +-CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS) +- +-include $(TOPDIR)/include/buildmacros +- +-endif +- +-# +-# For targets that should always be rebuilt, +-# define a target that is never up-to-date. +-# Targets needing this should depend on $(_FORCE) +-_FORCE = __force_build +diff --git a/include/buildmacros b/include/buildmacros +deleted file mode 100644 +index 9e81bb8..0000000 +--- a/include/buildmacros ++++ /dev/null +@@ -1,160 +0,0 @@ +-# +-# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see . +-# +- +-BUILDRULES = $(TOPDIR)/include/buildrules +- +-# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in +-# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES) +-# $(CXXFILES), or $(HFILES) and is used to construct the manifest list +-# during the "dist" phase (packaging). +- +-LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS) +-LTLDFLAGS += $(LOADERFLAGS) +-LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) +- +-MAKEOPTS = --no-print-directory +-SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES) +- +-DEPDIRT = dep dep.bak +-MANDIRT = *.[1-9].gz +-PODIRT = *.tmpo *.mo +-CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY) +-DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT) +- +-OBJECTS = $(ASFILES:.s=.o) \ +- $(CFILES:.c=.o) \ +- $(LFILES:.l=.o) \ +- $(YFILES:%.y=%.tab.o) +- +-INSTALL = $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP) +- +-IMAGES_DIR = $(TOPDIR)/all-images +-DIST_DIR = $(TOPDIR)/dist +- +-CCF = $(CC) $(CFLAGS) $(CPPFLAGS) +-MAKEF = $(MAKE) $(MAKEOPTS) +-CXXF = $(CXX) $(CXXFLAGS) +- +-# For libtool. +-LIBNAME = $(basename $(LTLIBRARY)) +-LTOBJECTS = $(OBJECTS:.o=.lo) +-LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +- +-LTLINK = $(LIBTOOL) --mode=link $(CC) +-LTEXEC = $(LIBTOOL) --mode=execute +-LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) +-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF) +- +-ifeq ($(ENABLE_SHARED),yes) +-LTLDFLAGS += -rpath $(PKG_LIB_DIR) +-LTLDFLAGS += -version-info $(LTVERSION) +-endif +- +-ifeq ($(ENABLE_SHARED),yes) +-INSTALL_LTLIB = \ +- cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ +- ../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \ +- ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR) +-endif +- +-# Libtool thinks the static and shared libs should be in the same dir, so +-# make the static lib appear in the place we chose as rpath (using the two +-# symlinks below). +-# Other things want the shared libs to appear in /usr/lib, else they'll +-# link with the static libs there. So, another symlink to get the .so into +-# /usr/lib. +-ifeq ($(ENABLE_SHARED),yes) +-INSTALL_LTLIB_DEV = \ +- cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ +- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \ +- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \ +- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ +- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \ +- if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ +- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ +- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ +- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \ +- fi +-else +-INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) +-endif +- +-INSTALL_LTLIB_STATIC = \ +- cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); +- +-INSTALL_MAN = \ +- @for d in $(MAN_PAGES); do \ +- first=true; \ +- for m in `$(AWK) \ +- '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \ +- | $(SED) \ +- -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \ +- -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \ +- do \ +- [ -z "$$m" -o "$$m" = "\\" ] && continue; \ +- t=$(MAN_DEST)/$$m.$(MAN_SECTION); \ +- if $$first; then \ +- if $(HAVE_ZIPPED_MANPAGES); then \ +- $(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \ +- fi; \ +- u=$$m.$(MAN_SECTION)$$_sfx; \ +- echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\ +- $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \ +- else \ +- echo $(INSTALL) -S $$u $${t}$$_sfx; \ +- $(INSTALL) -S $$u $${t}$$_sfx; \ +- fi; \ +- first=false; \ +- done; \ +- done +- +-ifeq ($(ENABLE_GETTEXT),yes) +-INSTALL_LINGUAS = \ +- @for l in $(LINGUAS) ""; do \ +- if test -f "$$l.mo" ; then \ +- ldir=$(PKG_LOCALE_DIR)/$$l/LC_MESSAGES; \ +- $(INSTALL) -m 755 -d $$ldir; \ +- $(INSTALL) -m 644 $$l.mo $$ldir/$(PKG_NAME).mo; \ +- fi; \ +- done +-endif +- +-MAN_MAKERULE = \ +- @for f in *.[12345678] ""; do \ +- if test ! -z "$$f"; then \ +- $(ZIP) --best -c < $$f > $$f.gz; \ +- fi; \ +- done +- +-DIST_MAKERULE = \ +- $(MAKEF) -C build dist +- +-SOURCE_MAKERULE = \ +- @test -z "$$DIR" && DIR="."; \ +- for f in $(SRCFILES) ""; do \ +- test -z "$$f" && break; \ +- test -L "$$f" || $(ECHO) $$DIR/$$f; \ +- done; \ +- for d in `echo $(SUBDIRS)` ""; do \ +- test -z "$$d" && break; \ +- if test -d "$$d"; then \ +- $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \ +- fi; \ +- done +diff --git a/include/buildrules b/include/buildrules +deleted file mode 100644 +index 159d70c..0000000 +--- a/include/buildrules ++++ /dev/null +@@ -1,104 +0,0 @@ +-# +-# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see . +-# +-ifndef _BUILDRULES_INCLUDED_ +-_BUILDRULES_INCLUDED_ = 1 +- +-include $(TOPDIR)/include/builddefs +- +-clean clobber : $(addsuffix -clean,$(SUBDIRS)) +- rm -f $(DIRT) +- @rm -fr .libs +- +-%-clean: +- $(MAKE) -C $* clean +- +-# Never blow away subdirs +-ifdef SUBDIRS +-.PRECIOUS: $(SUBDIRS) +-.PHONY: $(SUBDIRS) +- +-$(SUBDIRS): +- $(MAKE) -C $@ +-endif +- +-# +-# Standard targets +-# +- +-ifdef LTCOMMAND +-$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES) +- $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS) +-endif +- +-ifdef LTLIBRARY +-$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS) +- $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS) +- +-%.lo: %.c +- $(LTCOMPILE) -c $< +-endif +- +-ifdef POTHEAD +-%.pot: $(XGETTEXTFILES) +- $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES) +- +-# Generate temp .po files, to check whether translations need updating. +-# Not by default, due to gettext output differences between versions. +-%.po: $(POTHEAD) +-# $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD) +-# if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi +- +-%.mo: %.po +- $(MSGFMT) -o $@ $< +-endif +- +-source : +- $(SOURCE_MAKERULE) +- +-endif # _BUILDRULES_INCLUDED_ +- +-$(_FORCE): +- +-.PHONY : depend +- +-DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \ +- $(SED) -e 's,`pwd`,$(TOPDIR),g' \ +- -e 's, */[^ ]*,,g' \ +- -e '/^[^ ]*: *$$/d' \ +- -e '/^ *$$/d' +- +-ifdef LTLIBRARY +-DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' +-endif +- +-depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) +- $(DEPENDSCRIPT) > .dep +- test -s .dep || rm -f .dep +- +-%-depend: +- $(MAKE) -C $* depend +- +-# Include dep, but only if it exists +-ifeq ($(shell test -f .dep && echo .dep), .dep) +-include .dep +-else +-ifdef LTLIBRARY +-$(LTOBJECTS): $(HFILES) +-else +-$(OBJECTS): $(HFILES) +-endif +-endif +diff --git a/include/config.h.in b/include/config.h.in +deleted file mode 100644 +index 6a720ac..0000000 +--- a/include/config.h.in ++++ /dev/null +@@ -1,46 +0,0 @@ +-/* +- * Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved. +- * +- * This program is free software: you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by +- * the Free Software Foundation, either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program. If not, see . +- * +- * @configure_input@ +- */ +- +-/* Define if you have the attr/error_context.h header */ +-#undef HAVE_ATTR_ERROR_CONTEXT_H +- +-/* Define if you want Posix compliant getfacl and setfacl utilities +- without extensions */ +-#undef POSIXLY_CORRECT +- +-/* The number of bytes in a int. */ +-#undef SIZEOF_INT +- +-/* The number of bytes in a long. */ +-#undef SIZEOF_LONG +- +-/* The number of bytes in a short. */ +-#undef SIZEOF_SHORT +- +-/* Define if you have attribute((visibility(hidden))) in gcc. */ +-#undef HAVE_VISIBILITY_ATTRIBUTE +- +-/* Define if you want gettext (I18N) support */ +-#undef ENABLE_GETTEXT +- +-/* On GNU/kFreeBSD, ENODATA is not defined in the system headers */ +-#include +-#ifndef ENODATA +-# define ENODATA ENOATTR +-#endif +diff --git a/include/install-sh b/include/install-sh +deleted file mode 100755 +index 3c9d49b..0000000 +--- a/include/install-sh ++++ /dev/null +@@ -1,365 +0,0 @@ +-#! /bin/sh +-# +-# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +-# This script emulates bsd install and also recognises +-# two environment variables, with the following semantics :- +-# +-# $DIST_MANIFEST - if set, the name of the file to append manifest +-# information in the following format: +-# File : f mode owner group src target +-# Directory: d mode owner group target +-# Symlink : l linkval target +-# +-# $DIST_ROOT - if set, prepend to target +-# +-# The sematics of all combinations of these two variables +-# are as follows: +-# +-# $DIST_MANIFEST? $DIST_ROOT? | Copy? Append Manifest? +-# -----------------------------+-------------------------- +-# not set not set | yes no +-# not set set | yes no +-# set not set | no yes +-# set set | yes yes +-# +-_usage() { +- echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory" +- echo "or $prog [-D] [-o owner] [-g group] [-m mode] file directory/file" +- echo "or $prog [-o owner] [-g group] [-m mode] file [file ...] directory" +- echo "or $prog -S file target (creates \"target\" symlink)" +- echo "or $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory" +- echo "" +- echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the" +- echo "behaviour of this command - see comments in the script." +- echo "The -D flag is only available for the second usage, and causes" +- echo "the target directory to be created before installing the file." +- echo "" +- exit 1 +-} +- +-_chown () +-{ +- _st=255 +- if [ $# -eq 3 ] ; then +- chown $1:$2 $3 +- _st=$? +- if [ $_st -ne 0 ] ; then +- if [ $REAL_UID != '0' ] ; then +- if [ ! -f $DIST_ROOT/.chown.quiet ] ; then +- echo '===============================================' +- echo Ownership of files under ${DIST_ROOT:-/} +- echo cannot be changed +- echo '===============================================' +- if [ -n "$DIST_ROOT" ] ; then +- touch $DIST_ROOT/.chown.quiet +- fi +- fi +- _st=0 +- fi +- fi +- fi +- +- return $_st +-} +- +- +-_manifest () +-{ +- echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null} +-} +- +-prog=`basename $0` +-HERE=`pwd` +-dflag=false +-Dflag=false +-Sflag=false +-Tflag=false +-DIRMODE=755 +-FILEMODE=644 +-OWNER=`id -u` +-GROUP=`id -g` +-REAL_UID=$OWNER +- +-# default is to install and don't append manifest +-INSTALL=true +-MANIFEST=: +- +-: ${DIST_ROOT:=${DESTDIR}} +- +-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false +-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest" +- +-[ $# -eq 0 ] && _usage +- +-if $INSTALL +-then +- CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown +-else +- CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true +-fi +- +-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true +- +-while getopts "Dcm:d:S:o:g:T:" c $* +-do +- case $c in +- c) +- ;; +- g) +- GROUP=$OPTARG +- ;; +- o) +- OWNER=$OPTARG +- ;; +- m) +- DIRMODE=`expr $OPTARG` +- FILEMODE=$DIRMODE +- ;; +- D) +- Dflag=true +- ;; +- S) +- symlink=$OPTARG +- Sflag=true +- ;; +- d) +- dir=$DIST_ROOT/$OPTARG +- dflag=true +- ;; +- T) +- lt_install=$OPTARG +- Tflag=true +- ;; +- *) +- _usage +- ;; +- esac +-done +- +-shift `expr $OPTIND - 1` +- +-status=0 +-if $dflag +-then +- # +- # first usage +- # +- $MKDIR -p $dir +- status=$? +- if [ $status -eq 0 ] +- then +- $CHMOD $DIRMODE $dir +- status=$? +- fi +- if [ $status -eq 0 ] +- then +- $CHOWN $OWNER $GROUP $dir +- status=$? +- fi +- $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT} +-elif $Sflag +-then +- # +- # fourth usage (symlink) +- # +- if [ $# -ne 1 ] +- then +- _usage +- else +- target=$DIST_ROOT/$1 +- fi +- $LN -s -f $symlink $target +- status=$? +- $MANIFEST l $symlink ${target#$DIST_ROOT} +-elif $Tflag +-then +- # +- # -T (install libs built by libtool) +- # +- if [ $# -ne 2 ] +- then +- _usage +- else +- libtool_lai=$1 +- # source the libtool variables +- if [ ! -f $libtool_lai ] +- then +- echo "$prog: Unable to find libtool library file $libtool_lai" +- exit 2 +- fi +- . ./$libtool_lai +- target=$DIST_ROOT/$2 +- fi +- case $lt_install in +- so_dot_version) +- # Loop until we find libfoo.so.x.y.z, then break out. +- for solib in $library_names +- do +- # does it have enough parts? libfoo.so.x.y.z == 5 +- cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w` +- if [ $cnt -eq 5 ] +- then +- install_name=$target/$solib +- $CP $solib $install_name +- status=$? +- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT} +- break +- fi +- done +- ;; +- +- so_*) +- case $lt_install in +- so_dot_current) +- # ln -s libfoo.so.x.y.z to libfoo.so.x +- from_parts=5 # libfoo.so.x.y.z +- to_parts=3 # libfoo.so.x +- ;; +- so_base) +- # ln -s libfoo.so.x to libfoo.so +- from_parts=3 # libfoo.so.x +- to_parts=2 # libfoo.so +- ;; +- *) +- echo "$prog: -T $lt_install invalid" +- exit 2 +- ;; +- esac +- +- # Loop until we find the names, then break out. +- for solib in $library_names +- do +- # does it have enough parts? +- cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w` +- if [ $cnt -eq $from_parts ] +- then +- from_name=$solib +- elif [ $cnt -eq $to_parts ] +- then +- to_name=$solib +- fi +- +- if [ -n "$from_name" ] && [ -n "$to_name" ] +- then +- install_name=$target/$to_name +- $LN -s -f $from_name $install_name +- status=$? +- $MANIFEST l $from_name ${install_name#$DIST_ROOT} +- break +- fi +- done +- ;; +- old_lib) +- install_name=$target/$old_library +- $CP $old_library $install_name +- status=$? +- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT} +- ;; +- *) +- echo "$prog: -T $lt_install invalid" +- exit 2 +- ;; +- esac +- +- case $lt_install in +- old_lib|so_dot_version) +- if [ $status -eq 0 ] +- then +- $CHMOD $FILEMODE $install_name +- $CHOWN $OWNER $GROUP $install_name +- fi +- ;; +- esac +- +-else +- list="" +- dir="" +- if [ $# -eq 2 ] +- then +- # +- # second usage +- # +- f=$1 +- dir=$DIST_ROOT/$2 +- if $Dflag +- then +- mkdir -p `dirname $dir` +- fi +- $CP $f $dir +- status=$? +- if [ $status -eq 0 ] +- then +- if [ -f $dir/$f ] +- then +- $CHMOD $FILEMODE $dir/$f +- status=$? +- if [ $status -eq 0 ] +- then +- $CHOWN $OWNER $GROUP $dir/$f +- status=$? +- fi +- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f +- else +- $CHMOD $FILEMODE $dir +- status=$? +- if [ $status -eq 0 ] +- then +- $CHOWN $OWNER $GROUP $dir +- status=$? +- fi +- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT} +- fi +- fi +- else +- # +- # third usage +- # +- n=1 +- while [ $# -gt 0 ] +- do +- if [ $# -gt 1 ] +- then +- list="$list $1" +- else +- dir=$DIST_ROOT/$1 +- fi +- shift +- done +- +- # echo DIR=$dir list=\"$list\" +- for f in $list +- do +- $CP $f $dir +- status=$? +- if [ $status -eq 0 ] +- then +- $CHMOD $FILEMODE $dir/$f +- status=$? +- if [ $status -eq 0 ] +- then +- $CHOWN $OWNER $GROUP $dir/$f +- status=$? +- fi +- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f +- fi +- [ $status -ne 0 ] && break +- done +- fi +-fi +- +-exit $status +diff --git a/libacl/Makefile b/libacl/Makefile +deleted file mode 100644 +index 6befcd4..0000000 +--- a/libacl/Makefile ++++ /dev/null +@@ -1,68 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +- +-LTLDFLAGS += -Wl,--version-script,$(TOPDIR)/exports +-include $(TOPDIR)/include/builddefs +- +-LTLIBRARY = libacl.la +-LTLIBS = -lattr $(LIBMISC) +-LTDEPENDENCIES = $(LIBMISC) +-LT_CURRENT = 2 +-LT_REVISION = 0 +-LT_AGE = 1 +- +-CFILES = $(POSIX_CFILES) $(LIBACL_CFILES) $(INTERNAL_CFILES) \ +- perm_copy_fd.c perm_copy_file.c +-HFILES = libobj.h libacl.h byteorder.h __acl_from_xattr.h __acl_to_xattr.h \ +- perm_copy.h __acl_extended_file.h +- +-LCFLAGS = -include perm_copy.h +- +-POSIX_CFILES = \ +- acl_add_perm.c acl_calc_mask.c acl_clear_perms.c acl_copy_entry.c \ +- acl_copy_ext.c acl_copy_int.c acl_create_entry.c acl_delete_def_file.c \ +- acl_delete_entry.c acl_delete_perm.c acl_dup.c acl_free.c \ +- acl_from_text.c acl_get_entry.c acl_get_fd.c acl_get_file.c \ +- acl_get_perm.c acl_get_permset.c acl_get_qualifier.c \ +- acl_get_tag_type.c acl_init.c acl_set_fd.c acl_set_file.c \ +- acl_set_permset.c acl_set_qualifier.c acl_set_tag_type.c acl_to_text.c \ +- acl_valid.c acl_size.c +- +-LIBACL_CFILES = \ +- acl_to_any_text.c acl_entries.c acl_check.c acl_error.c acl_cmp.c \ +- acl_extended_fd.c acl_extended_file.c acl_equiv_mode.c acl_from_mode.c \ +- acl_extended_file_nofollow.c __acl_extended_file.c +- +-INTERNAL_CFILES = \ +- __acl_to_any_text.c __acl_to_xattr.c __acl_from_xattr.c \ +- __acl_reorder_obj_p.c __libobj.c __apply_mask_to_mode.c +- +- +-default: $(LTLIBRARY) +- +-include $(BUILDRULES) +- +-install: +- +-install-dev: default +- $(INSTALL_LTLIB_DEV) +- +-install-lib: default +- $(INSTALL_LTLIB) +diff --git a/libacl/Makemodule.am b/libacl/Makemodule.am +new file mode 100644 +index 0000000..c35214c +--- /dev/null ++++ b/libacl/Makemodule.am +@@ -0,0 +1,81 @@ ++lib_LTLIBRARIES += libacl.la ++ ++# No other library exports version info, otherwise we'd have to add ++# "libacl_" prefix to all these variables. ++LT_CURRENT = 2 ++# The configure script will set this for us automatically. ++#LT_REVISION = ++LT_AGE = 1 ++LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) ++ ++CFILES = $(POSIX_CFILES) $(LIBACL_CFILES) $(INTERNAL_CFILES) \ ++ libacl/perm_copy_fd.c \ ++ libacl/perm_copy_file.c ++HFILES = \ ++ libacl/libobj.h \ ++ libacl/libacl.h \ ++ libacl/byteorder.h \ ++ libacl/__acl_from_xattr.h \ ++ libacl/__acl_to_xattr.h \ ++ libacl/perm_copy.h \ ++ libacl/__acl_extended_file.h ++ ++POSIX_CFILES = \ ++ libacl/acl_add_perm.c \ ++ libacl/acl_calc_mask.c \ ++ libacl/acl_clear_perms.c \ ++ libacl/acl_copy_entry.c \ ++ libacl/acl_copy_ext.c \ ++ libacl/acl_copy_int.c \ ++ libacl/acl_create_entry.c \ ++ libacl/acl_delete_def_file.c \ ++ libacl/acl_delete_entry.c \ ++ libacl/acl_delete_perm.c \ ++ libacl/acl_dup.c \ ++ libacl/acl_free.c \ ++ libacl/acl_from_text.c \ ++ libacl/acl_get_entry.c \ ++ libacl/acl_get_fd.c \ ++ libacl/acl_get_file.c \ ++ libacl/acl_get_perm.c \ ++ libacl/acl_get_permset.c \ ++ libacl/acl_get_qualifier.c \ ++ libacl/acl_get_tag_type.c \ ++ libacl/acl_init.c \ ++ libacl/acl_set_fd.c \ ++ libacl/acl_set_file.c \ ++ libacl/acl_set_permset.c \ ++ libacl/acl_set_qualifier.c \ ++ libacl/acl_set_tag_type.c \ ++ libacl/acl_size.c \ ++ libacl/acl_to_text.c \ ++ libacl/acl_valid.c ++ ++LIBACL_CFILES = \ ++ libacl/acl_check.c \ ++ libacl/acl_cmp.c \ ++ libacl/acl_entries.c \ ++ libacl/acl_equiv_mode.c \ ++ libacl/acl_error.c \ ++ libacl/acl_extended_fd.c \ ++ libacl/acl_extended_file.c \ ++ libacl/acl_extended_file_nofollow.c \ ++ libacl/acl_from_mode.c \ ++ libacl/acl_to_any_text.c \ ++ libacl/__acl_extended_file.c ++ ++INTERNAL_CFILES = \ ++ libacl/__acl_from_xattr.c \ ++ libacl/__acl_reorder_obj_p.c \ ++ libacl/__acl_to_any_text.c \ ++ libacl/__acl_to_xattr.c \ ++ libacl/__apply_mask_to_mode.c \ ++ libacl/__libobj.c ++ ++libacl_la_DEPENDENCIES = exports libmisc.la ++libacl_la_SOURCES = $(CFILES) $(HFILES) ++libacl_la_LIBADD = -lattr libmisc.la ++libacl_la_CFLAGS = $(AM_CFLAGS) -include $(srcdir)/libacl/perm_copy.h ++libacl_la_LDFLAGS = \ ++ -Wl,--version-script,$(top_srcdir)/exports \ ++ -version-info $(LTVERSION) +diff --git a/libmisc/Makefile b/libmisc/Makefile +deleted file mode 100644 +index e64a287..0000000 +--- a/libmisc/Makefile ++++ /dev/null +@@ -1,31 +0,0 @@ +-# +-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. +-# Copyright (C) 2009 Andreas Gruenbacher +-# +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License as published by +-# the Free Software Foundation, either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see . +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LTLIBRARY = libmisc.la +-LTLDFLAGS = +- +-CFILES = quote.c unquote.c high_water_alloc.c next_line.c walk_tree.c +- +-default: $(LTLIBRARY) +-install install-dev install-lib: +- +-include $(BUILDRULES) +- +diff --git a/libmisc/Makemodule.am b/libmisc/Makemodule.am +new file mode 100644 +index 0000000..d784622 +--- /dev/null ++++ b/libmisc/Makemodule.am +@@ -0,0 +1,8 @@ ++noinst_LTLIBRARIES += libmisc.la ++ ++libmisc_la_SOURCES = \ ++ libmisc/high_water_alloc.c \ ++ libmisc/next_line.c \ ++ libmisc/quote.c \ ++ libmisc/unquote.c \ ++ libmisc/walk_tree.c +diff --git a/m4/.gitignore b/m4/.gitignore +new file mode 100644 +index 0000000..73d27ec +--- /dev/null ++++ b/m4/.gitignore +@@ -0,0 +1,3 @@ ++!.gitignore ++!package_attrdev.m4 ++!visibility_hidden.m4 +diff --git a/m4/Makefile b/m4/Makefile +deleted file mode 100644 +index 9748f11..0000000 +--- a/m4/Makefile ++++ /dev/null +@@ -1,34 +0,0 @@ +-# +-# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LSRCFILES = \ +- manual_format.m4 \ +- package_attrdev.m4 \ +- package_globals.m4 \ +- package_utilies.m4 \ +- visibility_hidden.m4 \ +- multilib.m4 +- +-default: +- +-include $(BUILDRULES) +- +-install install-dev install-lib: default +diff --git a/m4/manual_format.m4 b/m4/manual_format.m4 +deleted file mode 100644 +index 34aa466..0000000 +--- a/m4/manual_format.m4 ++++ /dev/null +@@ -1,31 +0,0 @@ +-dnl Copyright (C) 2003 Silicon Graphics, Inc. +-dnl +-dnl This program is free software: you can redistribute it and/or modify it +-dnl under the terms of the GNU General Public License as published by +-dnl the Free Software Foundation, either version 2 of the License, or +-dnl (at your option) any later version. +-dnl +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-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 . +-# +-# Find format of installed man pages. +-# Always gzipped on Debian, but not Redhat pre-7.0. +-# We don't deal with bzip2'd man pages, which Mandrake uses, +-# someone will send us a patch sometime hopefully. :-) +-# +-AC_DEFUN([AC_MANUAL_FORMAT], +- [ have_zipped_manpages=false +- for d in ${prefix}/share/man ${prefix}/man ; do +- if test -f $d/man1/man.1.gz +- then +- have_zipped_manpages=true +- break +- fi +- done +- AC_SUBST(have_zipped_manpages) +- ]) +diff --git a/m4/multilib.m4 b/m4/multilib.m4 +deleted file mode 100644 +index 8d991d8..0000000 +--- a/m4/multilib.m4 ++++ /dev/null +@@ -1,43 +0,0 @@ +-# The AC_MULTILIB macro was extracted and modified from +-# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file +-# so that the correct paths can be used for 64-bit libraries. +-# +-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +-dnl This file is free software; the Free Software Foundation +-dnl gives unlimited permission to copy and/or distribute it, +-dnl with or without modifications, as long as this notice is preserved. +-dnl From Bruno Haible. +- +-dnl AC_MULTILIB creates a variable libdirsuffix, containing +-dnl the suffix of the libdir, either "" or "64". +-dnl Only do this if the given enable parameter is "yes". +-AC_DEFUN([AC_MULTILIB], +-[ +- dnl There is no formal standard regarding lib and lib64. The current +- dnl practice is that on a system supporting 32-bit and 64-bit instruction +- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit +- dnl libraries go under $prefix/lib. We determine the compiler's default +- dnl mode by looking at the compiler's library search path. If at least +- dnl of its elements ends in /lib64 or points to a directory whose absolute +- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the +- dnl default, namely "lib". +- enable_lib64="$1" +- libdirsuffix="" +- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` +- if test "$enable_lib64" = "yes" -a -n "$searchpath"; then +- save_IFS="${IFS= }"; IFS=":" +- for searchdir in $searchpath; do +- if test -d "$searchdir"; then +- case "$searchdir" in +- */lib64/ | */lib64 ) libdirsuffix=64 ;; +- *) searchdir=`cd "$searchdir" && pwd` +- case "$searchdir" in +- */lib64 ) libdirsuffix=64 ;; +- esac ;; +- esac +- fi +- done +- IFS="$save_IFS" +- fi +- AC_SUBST(libdirsuffix) +-]) +diff --git a/m4/package_globals.m4 b/m4/package_globals.m4 +deleted file mode 100644 +index e5c2418..0000000 +--- a/m4/package_globals.m4 ++++ /dev/null +@@ -1,61 +0,0 @@ +-dnl Copyright (C) 2003, 2005, 2006, 2007 Silicon Graphics, Inc. +-dnl +-dnl This program is free software: you can redistribute it and/or modify it +-dnl under the terms of the GNU General Public License as published by +-dnl the Free Software Foundation, either version 2 of the License, or +-dnl (at your option) any later version. +-dnl +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-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 . +-# +-# Generic macro, sets up all of the global packaging variables. +-# The following environment variables may be set to override defaults: +-# DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP +-# BUILD_VERSION +-# +-AC_DEFUN([AC_PACKAGE_GLOBALS], +- [ pkg_name="$1" +- AC_SUBST(pkg_name) +- +- AC_PROG_CC +- +- . ./VERSION +- pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION} +- AC_SUBST(pkg_version) +- pkg_release=$PKG_BUILD +- test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION" +- AC_SUBST(pkg_release) +- +- DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG +- debug_build="$DEBUG" +- AC_SUBST(debug_build) +- +- OPTIMIZER=${OPTIMIZER:-'-g -O2'} +- opt_build="$OPTIMIZER" +- AC_SUBST(opt_build) +- +- MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a +- malloc_lib="$MALLOCLIB" +- AC_SUBST(malloc_lib) +- +- pkg_user=`id -u -n` +- test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" +- AC_SUBST(pkg_user) +- +- pkg_group=`id -g -n` +- test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" +- AC_SUBST(pkg_group) +- +- pkg_distribution=`uname -s` +- test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION" +- AC_SUBST(pkg_distribution) +- +- pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'` +- test -z "$PLATFORM" || pkg_platform="$PLATFORM" +- AC_SUBST(pkg_platform) +- ]) +diff --git a/m4/package_utilies.m4 b/m4/package_utilies.m4 +deleted file mode 100644 +index e372a6b..0000000 +--- a/m4/package_utilies.m4 ++++ /dev/null +@@ -1,95 +0,0 @@ +-dnl Copyright (C) 2003, 2004, 2005, 2006, 2007 Silicon Graphics, Inc. +-dnl +-dnl This program is free software: you can redistribute it and/or modify it +-dnl under the terms of the GNU General Public License as published by +-dnl the Free Software Foundation, either version 2 of the License, or +-dnl (at your option) any later version. +-dnl +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-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 . +-# +-# Check for specified utility (env var) - if unset, fail. +-# +-AC_DEFUN([AC_PACKAGE_NEED_UTILITY], +- [ if test -z "$2"; then +- echo +- echo FATAL ERROR: $3 does not seem to be installed. +- echo $1 cannot be built without a working $4 installation. +- exit 1 +- fi +- ]) +- +-# +-# Generic macro, sets up all of the global build variables. +-# The following environment variables may be set to override defaults: +-# CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT +-# MSGFMT MSGMERGE XGETTEXT +-# +-AC_DEFUN([AC_PACKAGE_UTILITIES], +- [ AC_PROG_CC +- cc="$CC" +- AC_SUBST(cc) +- AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler]) +- +- search_path="$PATH$PATH_SEPARATOR/usr/freeware/bin$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR/usr/local/bin" +- +- AC_PATH_PROGS(MAKE, gmake make,, $search_path) +- make=$MAKE +- AC_SUBST(make) +- AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make]) +- +- AC_PATH_PROG(TAR, tar,, $search_path) +- tar=$TAR +- AC_SUBST(tar) +- +- AC_PATH_PROG(ZIP, gzip,, $search_path) +- zip=$ZIP +- AC_SUBST(zip) +- +- AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) +- makedepend=$MAKEDEPEND +- AC_SUBST(makedepend) +- +- AC_PATH_PROG(AWK, awk,, $search_path) +- awk=$AWK +- AC_SUBST(awk) +- +- AC_PATH_PROG(SED, sed,, $search_path) +- sed=$SED +- AC_SUBST(sed) +- +- AC_PATH_PROG(ECHO, echo,, $search_path) +- echo=$ECHO +- AC_SUBST(echo) +- +- AC_PATH_PROG(SORT, sort,, $search_path) +- sort=$SORT +- AC_SUBST(sort) +- +- dnl check if symbolic links are supported +- AC_PROG_LN_S +- +- if test "$enable_gettext" = yes; then +- AC_PATH_PROG(MSGFMT, msgfmt,, $search_path) +- msgfmt=$MSGFMT +- AC_SUBST(msgfmt) +- AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext) +- +- AC_PATH_PROG(MSGMERGE, msgmerge,, $search_path) +- msgmerge=$MSGMERGE +- AC_SUBST(msgmerge) +- AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext) +- +- AC_PATH_PROG(XGETTEXT, xgettext,, $search_path) +- xgettext=$XGETTEXT +- AC_SUBST(xgettext) +- AC_PACKAGE_NEED_UTILITY($1, "$xgettext", xgettext, gettext) +- +- AC_DEFINE([ENABLE_GETTEXT], 1, [enable gettext]) +- fi +- ]) +diff --git a/man/Makefile b/man/Makefile +deleted file mode 100644 +index a2e7546..0000000 +--- a/man/Makefile ++++ /dev/null +@@ -1,41 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-SUBDIRS = man1 man3 man5 +- +-default : $(SUBDIRS) +- +-install : $(addsuffix -install,$(SUBDIRS)) +- +-install-dev : $(addsuffix -install-dev,$(SUBDIRS)) +- +-install-lib: $(addsuffix -install-lib,$(SUBDIRS)) +- +-%-install: +- $(MAKE) -C $* install +- +-%-install-dev: +- $(MAKE) -C $* install-dev +- +-%-install-lib: +- $(MAKE) -C $* install-lib +- +-include $(BUILDRULES) +diff --git a/man/Makemodule.am b/man/Makemodule.am +new file mode 100644 +index 0000000..c18576c +--- /dev/null ++++ b/man/Makemodule.am +@@ -0,0 +1,3 @@ ++include man/man1/Makemodule.am ++include man/man3/Makemodule.am ++include man/man5/Makemodule.am +diff --git a/man/man1/Makefile b/man/man1/Makefile +deleted file mode 100644 +index 2fd48eb..0000000 +--- a/man/man1/Makefile ++++ /dev/null +@@ -1,35 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = ../.. +-include $(TOPDIR)/include/builddefs +- +-MAN_SECTION = 1 +- +-MAN_PAGES = $(shell echo *.$(MAN_SECTION)) +-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION) +-LSRCFILES = $(MAN_PAGES) +- +-default : $(MAN_PAGES) +- +-include $(BUILDRULES) +- +-install : default +- $(INSTALL) -m 755 -d $(MAN_DEST) +- $(INSTALL_MAN) +-install-dev install-lib: +diff --git a/man/man1/Makemodule.am b/man/man1/Makemodule.am +new file mode 100644 +index 0000000..f80e26a +--- /dev/null ++++ b/man/man1/Makemodule.am +@@ -0,0 +1,4 @@ ++dist_man_MANS += \ ++ man/man1/chacl.1 \ ++ man/man1/getfacl.1 \ ++ man/man1/setfacl.1 +diff --git a/man/man3/Makefile b/man/man3/Makefile +deleted file mode 100644 +index c00f02d..0000000 +--- a/man/man3/Makefile ++++ /dev/null +@@ -1,35 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = ../.. +-include $(TOPDIR)/include/builddefs +- +-MAN_SECTION = 3 +- +-MAN_PAGES = $(shell echo *.$(MAN_SECTION)) +-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION) +-LSRCFILES = $(MAN_PAGES) +- +-default : $(MAN_PAGES) +- +-include $(BUILDRULES) +- +-install-dev : default +- $(INSTALL) -m 755 -d $(MAN_DEST) +- $(INSTALL_MAN) +-install install-lib: +diff --git a/man/man3/Makemodule.am b/man/man3/Makemodule.am +new file mode 100644 +index 0000000..c0c4825 +--- /dev/null ++++ b/man/man3/Makemodule.am +@@ -0,0 +1,40 @@ ++dist_man_MANS += \ ++ man/man3/acl_add_perm.3 \ ++ man/man3/acl_calc_mask.3 \ ++ man/man3/acl_check.3 \ ++ man/man3/acl_clear_perms.3 \ ++ man/man3/acl_cmp.3 \ ++ man/man3/acl_copy_entry.3 \ ++ man/man3/acl_copy_ext.3 \ ++ man/man3/acl_copy_int.3 \ ++ man/man3/acl_create_entry.3 \ ++ man/man3/acl_delete_def_file.3 \ ++ man/man3/acl_delete_entry.3 \ ++ man/man3/acl_delete_perm.3 \ ++ man/man3/acl_dup.3 \ ++ man/man3/acl_entries.3 \ ++ man/man3/acl_equiv_mode.3 \ ++ man/man3/acl_error.3 \ ++ man/man3/acl_extended_fd.3 \ ++ man/man3/acl_extended_file.3 \ ++ man/man3/acl_extended_file_nofollow.3 \ ++ man/man3/acl_free.3 \ ++ man/man3/acl_from_mode.3 \ ++ man/man3/acl_from_text.3 \ ++ man/man3/acl_get_entry.3 \ ++ man/man3/acl_get_fd.3 \ ++ man/man3/acl_get_file.3 \ ++ man/man3/acl_get_perm.3 \ ++ man/man3/acl_get_permset.3 \ ++ man/man3/acl_get_qualifier.3 \ ++ man/man3/acl_get_tag_type.3 \ ++ man/man3/acl_init.3 \ ++ man/man3/acl_set_fd.3 \ ++ man/man3/acl_set_file.3 \ ++ man/man3/acl_set_permset.3 \ ++ man/man3/acl_set_qualifier.3 \ ++ man/man3/acl_set_tag_type.3 \ ++ man/man3/acl_size.3 \ ++ man/man3/acl_to_any_text.3 \ ++ man/man3/acl_to_text.3 \ ++ man/man3/acl_valid.3 +diff --git a/man/man5/Makefile b/man/man5/Makefile +deleted file mode 100644 +index 51de8d9..0000000 +--- a/man/man5/Makefile ++++ /dev/null +@@ -1,35 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = ../.. +-include $(TOPDIR)/include/builddefs +- +-MAN_SECTION = 5 +- +-MAN_PAGES = $(shell echo *.$(MAN_SECTION)) +-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION) +-LSRCFILES = $(MAN_PAGES) +- +-default : $(MAN_PAGES) +- +-include $(BUILDRULES) +- +-install : default +- $(INSTALL) -m 755 -d $(MAN_DEST) +- $(INSTALL_MAN) +-install-dev install-lib: +diff --git a/man/man5/Makemodule.am b/man/man5/Makemodule.am +new file mode 100644 +index 0000000..7d053b8 +--- /dev/null ++++ b/man/man5/Makemodule.am +@@ -0,0 +1,2 @@ ++dist_man_MANS += \ ++ man/man5/acl.5 +diff --git a/package/Makefile b/package/Makefile +deleted file mode 100644 +index 6f5aa69..0000000 +--- a/package/Makefile ++++ /dev/null +@@ -1,60 +0,0 @@ +-# +-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-MANIFEST=src-manifest +-SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz +- +-LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-* +- +-# for clean and clobber +-SUBDIRS = tar +- +-# nothing to build here (it's all packaging) +-default install install-dev install-lib: +- +-include $(BUILDRULES) +- +-# Symlink in the TOPDIR is used to pack files relative to +-# product-version directory. +-$(MANIFEST) : $(_FORCE) +- @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \ +- $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \ +- fi +- @CDIR=`pwd`; cd $(TOPDIR); \ +- $(MAKE) --no-print-directory source | \ +- sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\ +- if [ $$? -ne 0 ] ; then \ +- exit 1; \ +- else \ +- unset TAPE; \ +- $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \ +- echo Wrote: $$CDIR/$(SRCTAR); \ +- fi +- +-dist : default $(MANIFEST) +- @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \ +- export DIST_MANIFEST DIST_ROOT; \ +- rm -f $$DIST_MANIFEST; \ +- echo === install === && $(MAKE) -C $(TOPDIR) install || exit $$?; \ +- if [ -x $(TAR) ]; then \ +- ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \ +- fi; \ +- test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done +diff --git a/package/tar/Makefile b/package/tar/Makefile +deleted file mode 100644 +index 31c8f92..0000000 +--- a/package/tar/Makefile ++++ /dev/null +@@ -1,36 +0,0 @@ +-# +-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = ../.. +-include $(TOPDIR)/include/builddefs +- +-BINTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz +-LDIRT = *.gz +- +-default install install-dev install-lib: +- +-include $(BUILDRULES) +- +-dist : default +- @HERE=`pwd`; cd $${DIST_ROOT:-/}; \ +- $(SORT) -u $$HERE/../bin-manifest | $(AWK) ' \ +- $$1 == "f" { printf (".%s\n", $$6); } \ +- $$1 == "d" { next; } \ +- $$1 == "l" { printf (".%s\n", $$3); }' \ +- | $(TAR) -T - -cf - | $(ZIP) --best > $$HERE/$(BINTAR) +- @echo Wrote: `pwd`/$(BINTAR) +diff --git a/po/.gitignore b/po/.gitignore +new file mode 100644 +index 0000000..8fe225b +--- /dev/null ++++ b/po/.gitignore +@@ -0,0 +1,12 @@ ++*.gmo ++*.sed ++*.sin ++acl.pot ++Makefile.in.in ++Makevars.template ++POTFILES ++POTFILES.in ++Rules-quot ++en@boldquot.* ++en@quot.* ++stamp-po +diff --git a/po/LINGUAS b/po/LINGUAS +new file mode 100644 +index 0000000..a1950c5 +--- /dev/null ++++ b/po/LINGUAS +@@ -0,0 +1,3 @@ ++de es fr gl pl sv ++en@boldquot ++en@quot +diff --git a/po/Makefile b/po/Makefile +deleted file mode 100644 +index 7cd5b61..0000000 +--- a/po/Makefile ++++ /dev/null +@@ -1,42 +0,0 @@ +-# +-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-POTHEAD = $(PKG_NAME).pot +-LINGUAS ?= de es fr gl pl sv +-LSRCFILES = $(LINGUAS:%=%.po) $(POTHEAD) +-LDIRT = $(POTHEAD) +- +-XGETTEXTFILES = $(TOPDIR)/chacl/chacl.c \ +- $(TOPDIR)/setfacl/do_set.c \ +- $(TOPDIR)/setfacl/setfacl.c \ +- $(TOPDIR)/getfacl/getfacl.c \ +- $(TOPDIR)/libacl/acl_error.c \ +- $(TOPDIR)/libacl/perm_copy_fd.c \ +- $(TOPDIR)/libacl/perm_copy_file.c +- +-default: $(POTHEAD) $(LINGUAS:%=%.mo) +- +-include $(BUILDRULES) +- +-install: default +- $(INSTALL_LINGUAS) +- +-install-dev install-lib: +diff --git a/po/Makevars b/po/Makevars +new file mode 100644 +index 0000000..4b17ab3 +--- /dev/null ++++ b/po/Makevars +@@ -0,0 +1,41 @@ ++# Makefile variables for PO directory in any package using GNU gettext. ++ ++# Usually the message domain is the same as the package name. ++DOMAIN = $(PACKAGE) ++ ++# These two variables depend on the location of this directory. ++subdir = po ++top_builddir = .. ++ ++# These options get passed to xgettext. ++XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ ++ ++# This is the copyright holder that gets inserted into the header of the ++# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding ++# package. (Note that the msgstr strings, extracted from the package's ++# sources, belong to the copyright holder of the package.) Translators are ++# expected to transfer the copyright for their translations to this person ++# or entity, or to disclaim their copyright. The empty string stands for ++# the public domain; in this case the translators are expected to disclaim ++# their copyright. ++COPYRIGHT_HOLDER = Silicon Graphics, Inc. ++ ++# This is the email address or URL to which the translators shall report ++# bugs in the untranslated strings: ++# - Strings which are not entire sentences, see the maintainer guidelines ++# in the GNU gettext documentation, section 'Preparing Strings'. ++# - Strings which use unclear terms or require additional context to be ++# understood. ++# - Strings which make invalid assumptions about notation of date, time or ++# money. ++# - Pluralisation problems. ++# - Incorrect English spelling. ++# - Incorrect formatting. ++# It can be your email address, or a mailing list address where translators ++# can write to without being subscribed, or the URL of a web page through ++# which the translators can contact you. ++MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) ++ ++# This is the list of locale categories, beyond LC_MESSAGES, for which the ++# message catalogs shall be used. It is usually empty. ++EXTRA_LOCALE_CATEGORIES = +diff --git a/po/update-potfiles b/po/update-potfiles +new file mode 100755 +index 0000000..271da7e +--- /dev/null ++++ b/po/update-potfiles +@@ -0,0 +1,13 @@ ++#!/bin/sh -e ++ ++( ++echo "# updated automatically by $0" ++echo ++find \ ++ include \ ++ libacl \ ++ libmisc \ ++ tools \ ++ -name '*.[ch]' \ ++ | grep -v include/config.h ++) > po/POTFILES.in +diff --git a/setfacl/Makefile b/setfacl/Makefile +deleted file mode 100644 +index c44e7c0..0000000 +--- a/setfacl/Makefile ++++ /dev/null +@@ -1,36 +0,0 @@ +-# +-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-LTCOMMAND = setfacl +-CFILES = setfacl.c do_set.c sequence.c parse.c +-HFILES = sequence.h parse.h do_set.h +- +-LLDLIBS = $(LIBMISC) $(LIBACL) $(LIBATTR) +-LTDEPENDENCIES = $(LIBMISC) $(LIBACL) +- +-default: $(LTCOMMAND) +- +-include $(BUILDRULES) +- +-install: default +- $(INSTALL) -m 755 -d $(PKG_BIN_DIR) +- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR) +-install-dev install-lib: +diff --git a/setfacl/do_set.c b/setfacl/do_set.c +deleted file mode 100644 +index 60da837..0000000 +--- a/setfacl/do_set.c ++++ /dev/null +@@ -1,528 +0,0 @@ +-/* +- File: do_set.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999, 2000 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#include "config.h" +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "misc.h" +-#include "sequence.h" +-#include "do_set.h" +-#include "parse.h" +-#include "walk_tree.h" +- +- +-extern const char *progname; +-extern int opt_recalculate; +-extern int opt_test; +-extern int print_options; +- +-acl_entry_t +-find_entry( +- acl_t acl, +- acl_tag_t type, +- id_t id) +-{ +- acl_entry_t ent; +- acl_tag_t e_type; +- id_t *e_id_p; +- +- if (acl_get_entry(acl, ACL_FIRST_ENTRY, &ent) != 1) +- return NULL; +- +- for(;;) { +- acl_get_tag_type(ent, &e_type); +- if (type == e_type) { +- if (id != ACL_UNDEFINED_ID) { +- e_id_p = acl_get_qualifier(ent); +- if (e_id_p == NULL) +- return NULL; +- if (*e_id_p == id) { +- acl_free(e_id_p); +- return ent; +- } +- acl_free(e_id_p); +- } else { +- return ent; +- } +- } +- if (acl_get_entry(acl, ACL_NEXT_ENTRY, &ent) != 1) +- return NULL; +- } +-} +- +-int +-has_execute_perms( +- acl_t acl) +-{ +- acl_entry_t ent; +- +- if (acl_get_entry(acl, ACL_FIRST_ENTRY, &ent) != 1) +- return 0; +- +- for(;;) { +- acl_permset_t permset; +- +- acl_get_permset(ent, &permset); +- if (acl_get_perm(permset, ACL_EXECUTE) != 0) +- return 1; +- +- if (acl_get_entry(acl, ACL_NEXT_ENTRY, &ent) != 1) +- return 0; +- } +-} +- +-int +-clone_entry( +- acl_t from_acl, +- acl_tag_t from_type, +- acl_t *to_acl, +- acl_tag_t to_type) +-{ +- acl_entry_t from_entry, to_entry; +- from_entry = find_entry(from_acl, from_type, ACL_UNDEFINED_ID); +- if (from_entry) { +- if (acl_create_entry(to_acl, &to_entry) != 0) +- return -1; +- acl_copy_entry(to_entry, from_entry); +- acl_set_tag_type(to_entry, to_type); +- return 0; +- } else { +- return 1; +- } +-} +- +- +-void +-print_test( +- FILE *file, +- const char *path_p, +- const struct stat *st, +- const acl_t acl, +- const acl_t default_acl) +-{ +- char *acl_text, *default_acl_text; +- +- acl_text = acl_to_any_text(acl, NULL, ',', TEXT_ABBREVIATE); +- default_acl_text = +- acl_to_any_text(default_acl, "d:", ',', TEXT_ABBREVIATE); +- fprintf(file, "%s: %s,%s\n", path_p, +- acl_text ? acl_text : "*", +- default_acl_text ? default_acl_text : "*"); +- acl_free(acl_text); +- acl_free(default_acl_text); +-} +- +- +-static void +-set_perm( +- acl_entry_t ent, +- mode_t perm) +-{ +- acl_permset_t set; +- +- acl_get_permset(ent, &set); +- if (perm & CMD_PERM_READ) +- acl_add_perm(set, ACL_READ); +- else +- acl_delete_perm(set, ACL_READ); +- if (perm & CMD_PERM_WRITE) +- acl_add_perm(set, ACL_WRITE); +- else +- acl_delete_perm(set, ACL_WRITE); +- if (perm & CMD_PERM_EXECUTE) +- acl_add_perm(set, ACL_EXECUTE); +- else +- acl_delete_perm(set, ACL_EXECUTE); +-} +- +- +-static int +-retrieve_acl( +- const char *path_p, +- acl_type_t type, +- const struct stat *st, +- acl_t *old_acl, +- acl_t *acl) +-{ +- if (*acl) +- return 0; +- *acl = NULL; +- if (type == ACL_TYPE_ACCESS || S_ISDIR(st->st_mode)) { +- *old_acl = acl_get_file(path_p, type); +- if (*old_acl == NULL && (errno == ENOSYS || errno == ENOTSUP)) { +- if (type == ACL_TYPE_DEFAULT) +- *old_acl = acl_init(0); +- else +- *old_acl = acl_from_mode(st->st_mode); +- } +- } else +- *old_acl = acl_init(0); +- if (*old_acl == NULL) +- return -1; +- *acl = acl_dup(*old_acl); +- if (*acl == NULL) +- return -1; +- return 0; +-} +- +- +-static int +-remove_extended_entries( +- acl_t acl) +-{ +- acl_entry_t ent, group_obj; +- acl_permset_t mask_permset, group_obj_permset; +- acl_tag_t tag; +- int error; +- +- /* +- * Removing the ACL_MASK entry from the ACL results in +- * increased permissions for the owning group if the +- * ACL_GROUP_OBJ entry contains permissions not contained +- * in the ACL_MASK entry. We remove these permissions from +- * the ACL_GROUP_OBJ entry to avoid that. +- * +- * After removing the ACL, the file owner and the owning group +- * therefore have the same permissions as before. +- */ +- +- ent = find_entry(acl, ACL_MASK, ACL_UNDEFINED_ID); +- group_obj = find_entry(acl, ACL_GROUP_OBJ, ACL_UNDEFINED_ID); +- if (ent && group_obj) { +- if (!acl_get_permset(ent, &mask_permset) && +- !acl_get_permset(group_obj, &group_obj_permset)) { +- if (!acl_get_perm(mask_permset, ACL_READ)) +- acl_delete_perm(group_obj_permset, ACL_READ); +- if (!acl_get_perm(mask_permset, ACL_WRITE)) +- acl_delete_perm(group_obj_permset, ACL_WRITE); +- if (!acl_get_perm(mask_permset, ACL_EXECUTE)) +- acl_delete_perm(group_obj_permset, ACL_EXECUTE); +- } +- } +- +- error = acl_get_entry(acl, ACL_FIRST_ENTRY, &ent); +- while (error == 1) { +- acl_get_tag_type(ent, &tag); +- switch(tag) { +- case ACL_USER: +- case ACL_GROUP: +- case ACL_MASK: +- acl_delete_entry(acl, ent); +- break; +- default: +- break; +- } +- +- error = acl_get_entry(acl, ACL_NEXT_ENTRY, &ent); +- } +- if (error < 0) +- return -1; +- return 0; +-} +- +- +-#define RETRIEVE_ACL(type) do { \ +- error = retrieve_acl(path_p, type, st, old_xacl, xacl); \ +- if (error) \ +- goto fail; \ +- } while(0) +- +-int +-do_set( +- const char *path_p, +- const struct stat *st, +- int walk_flags, +- void *arg) +-{ +- struct do_set_args *args = arg; +- acl_t old_acl = NULL, old_default_acl = NULL; +- acl_t acl = NULL, default_acl = NULL; +- acl_t *xacl, *old_xacl; +- acl_entry_t ent; +- cmd_t cmd; +- int which_entry; +- int errors = 0, error; +- char *acl_text; +- int acl_modified = 0, default_acl_modified = 0; +- int acl_mask_provided = 0, default_acl_mask_provided = 0; +- +- if (walk_flags & WALK_TREE_FAILED) { +- fprintf(stderr, "%s: %s: %s\n", progname, path_p, strerror(errno)); +- return 1; +- } +- +- /* +- * Symlinks can never have ACLs, so when doing a physical walk, we +- * skip symlinks altogether, and when doing a half-logical walk, we +- * skip all non-toplevel symlinks. +- */ +- if ((walk_flags & WALK_TREE_SYMLINK) && +- ((walk_flags & WALK_TREE_PHYSICAL) || +- !(walk_flags & (WALK_TREE_TOPLEVEL | WALK_TREE_LOGICAL)))) +- return 0; +- +- /* Execute the commands in seq (read ACLs on demand) */ +- error = seq_get_cmd(args->seq, SEQ_FIRST_CMD, &cmd); +- if (error == 0) +- return 0; +- while (error == 1) { +- mode_t perm = cmd->c_perm; +- +- if (cmd->c_type == ACL_TYPE_ACCESS) { +- xacl = &acl; +- old_xacl = &old_acl; +- acl_modified = 1; +- if (cmd->c_tag == ACL_MASK) +- acl_mask_provided = 1; +- } else { +- xacl = &default_acl; +- old_xacl = &old_default_acl; +- default_acl_modified = 1; +- if (cmd->c_tag == ACL_MASK) +- default_acl_mask_provided = 1; +- } +- +- RETRIEVE_ACL(cmd->c_type); +- +- /* Check for `X', and replace with `x' as appropriate. */ +- if (perm & CMD_PERM_COND_EXECUTE) { +- perm &= ~CMD_PERM_COND_EXECUTE; +- if (S_ISDIR(st->st_mode) || has_execute_perms(*xacl)) +- perm |= CMD_PERM_EXECUTE; +- } +- +- switch(cmd->c_cmd) { +- case CMD_ENTRY_REPLACE: +- ent = find_entry(*xacl, cmd->c_tag, cmd->c_id); +- if (!ent) { +- if (acl_create_entry(xacl, &ent) != 0) +- goto fail; +- acl_set_tag_type(ent, cmd->c_tag); +- if (cmd->c_id != ACL_UNDEFINED_ID) +- acl_set_qualifier(ent, +- &cmd->c_id); +- } +- set_perm(ent, perm); +- break; +- +- case CMD_REMOVE_ENTRY: +- ent = find_entry(*xacl, cmd->c_tag, cmd->c_id); +- if (ent) +- acl_delete_entry(*xacl, ent); +- else +- /* ignore */; +- break; +- +- case CMD_REMOVE_EXTENDED_ACL: +- remove_extended_entries(acl); +- break; +- +- case CMD_REMOVE_ACL: +- acl_free(*xacl); +- *xacl = acl_init(5); +- if (!*xacl) +- goto fail; +- break; +- +- default: +- errno = EINVAL; +- goto fail; +- } +- +- error = seq_get_cmd(args->seq, SEQ_NEXT_CMD, &cmd); +- } +- +- if (error < 0) +- goto fail; +- +- /* Try to fill in missing entries */ +- if (default_acl && acl_entries(default_acl) != 0) { +- xacl = &acl; +- old_xacl = &old_acl; +- +- if (!find_entry(default_acl, ACL_USER_OBJ, ACL_UNDEFINED_ID)) { +- if (!acl) +- RETRIEVE_ACL(ACL_TYPE_ACCESS); +- clone_entry(acl, ACL_USER_OBJ, +- &default_acl, ACL_USER_OBJ); +- } +- if (!find_entry(default_acl, ACL_GROUP_OBJ, ACL_UNDEFINED_ID)) { +- if (!acl) +- RETRIEVE_ACL(ACL_TYPE_ACCESS); +- clone_entry(acl, ACL_GROUP_OBJ, +- &default_acl, ACL_GROUP_OBJ); +- } +- if (!find_entry(default_acl, ACL_OTHER, ACL_UNDEFINED_ID)) { +- if (!acl) +- RETRIEVE_ACL(ACL_TYPE_ACCESS); +- clone_entry(acl, ACL_OTHER, +- &default_acl, ACL_OTHER); +- } +- } +- +- /* update mask entries and check if ACLs are valid */ +- if (acl && acl_modified) { +- if (acl_equiv_mode(acl, NULL) != 0) { +- if (!acl_mask_provided && +- !find_entry(acl, ACL_MASK, ACL_UNDEFINED_ID)) +- clone_entry(acl, ACL_GROUP_OBJ, +- &acl, ACL_MASK); +- if (opt_recalculate != -1 && +- (!acl_mask_provided || opt_recalculate == 1)) +- acl_calc_mask(&acl); +- } +- +- error = acl_check(acl, &which_entry); +- if (error < 0) +- goto fail; +- if (error > 0) { +- acl_text = acl_to_any_text(acl, NULL, ',', 0); +- fprintf(stderr, _("%s: %s: Malformed access ACL " +- "`%s': %s at entry %d\n"), progname, path_p, +- acl_text, acl_error(error), which_entry+1); +- acl_free(acl_text); +- errors++; +- goto cleanup; +- } +- } +- +- if (default_acl && acl_entries(default_acl) != 0 && +- default_acl_modified) { +- if (acl_equiv_mode(default_acl, NULL) != 0) { +- if (!default_acl_mask_provided && +- !find_entry(default_acl,ACL_MASK,ACL_UNDEFINED_ID)) +- clone_entry(default_acl, ACL_GROUP_OBJ, +- &default_acl, ACL_MASK); +- if (opt_recalculate != -1 && +- (!default_acl_mask_provided || +- opt_recalculate == 1)) +- acl_calc_mask(&default_acl); +- } +- +- error = acl_check(default_acl, &which_entry); +- if (error < 0) +- goto fail; +- if (error > 0) { +- acl_text = acl_to_any_text(default_acl, NULL, ',', 0); +- fprintf(stderr, _("%s: %s: Malformed default ACL " +- "`%s': %s at entry %d\n"), +- progname, path_p, acl_text, +- acl_error(error), which_entry+1); +- acl_free(acl_text); +- errors++; +- goto cleanup; +- } +- } +- +- /* Only directores can have default ACLs */ +- if (default_acl && !S_ISDIR(st->st_mode) && (walk_flags & WALK_TREE_RECURSIVE)) { +- /* In recursive mode, ignore default ACLs for files */ +- acl_free(default_acl); +- default_acl = NULL; +- } +- +- /* check which ACLs have changed */ +- if (acl && old_acl && acl_cmp(old_acl, acl) == 0) { +- acl_free(acl); +- acl = NULL; +- } +- if ((default_acl && old_default_acl && +- acl_cmp(old_default_acl, default_acl) == 0)) { +- acl_free(default_acl); +- default_acl = NULL; +- } +- +- /* update the file system */ +- if (opt_test) { +- print_test(stdout, path_p, st, +- acl, default_acl); +- goto cleanup; +- } +- if (acl) { +- int equiv_mode; +- mode_t mode = 0; +- +- equiv_mode = acl_equiv_mode(acl, &mode); +- +- if (acl_set_file(path_p, ACL_TYPE_ACCESS, acl) != 0) { +- if (errno == ENOSYS || errno == ENOTSUP) { +- if (equiv_mode != 0) +- goto fail; +- else if (chmod(path_p, mode) != 0) +- goto fail; +- } else +- goto fail; +- } +- args->mode = mode; +- } +- if (default_acl) { +- if (S_ISDIR(st->st_mode)) { +- if (acl_entries(default_acl) == 0) { +- if (acl_delete_def_file(path_p) != 0 && +- errno != ENOSYS && errno != ENOTSUP) +- goto fail; +- } else { +- if (acl_set_file(path_p, ACL_TYPE_DEFAULT, +- default_acl) != 0) +- goto fail; +- } +- } else { +- if (acl_entries(default_acl) != 0) { +- fprintf(stderr, _("%s: %s: Only directories " +- "can have default ACLs\n"), +- progname, path_p); +- errors++; +- goto cleanup; +- } +- } +- } +- +- error = 0; +- +-cleanup: +- if (acl) +- acl_free(acl); +- if (old_acl) +- acl_free(old_acl); +- if (default_acl) +- acl_free(default_acl); +- if (old_default_acl) +- acl_free(old_default_acl); +- return errors; +- +-fail: +- fprintf(stderr, "%s: %s: %s\n", progname, path_p, strerror(errno)); +- errors++; +- goto cleanup; +-} +- +diff --git a/setfacl/do_set.h b/setfacl/do_set.h +deleted file mode 100644 +index 2ea25a8..0000000 +--- a/setfacl/do_set.h ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* +- File: do_set.h +- (Linux Access Control List Management) +- +- Copyright (C) 2009 by Andreas Gruenbacher +- +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#ifndef __DO_SET_H +-#define __DO_SET_H +- +-#include "sequence.h" +- +-struct do_set_args { +- seq_t seq; +- mode_t mode; +-}; +- +-extern int do_set(const char *path_p, const struct stat *stat_p, int flags, +- void *arg); +- +-#endif /* __DO_SET_H */ +diff --git a/setfacl/parse.c b/setfacl/parse.c +deleted file mode 100644 +index e7e6add..0000000 +--- a/setfacl/parse.c ++++ /dev/null +@@ -1,594 +0,0 @@ +-/* +- File: parse.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999, 2000 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include "sys/acl.h" +- +-#include "sequence.h" +-#include "parse.h" +-#include "misc.h" +- +-#define SKIP_WS(x) ({ \ +- while (*(x)==' ' || *(x)=='\t' || *(x)=='\n' || *(x)=='\r') \ +- (x)++; \ +- }) +- +- +-static int +-skip_tag_name( +- const char **text_p, +- const char *token) +-{ +- size_t len = strlen(token); +- const char *text = *text_p; +- +- SKIP_WS(text); +- if (strncmp(text, token, len) == 0) { +- text += len; +- goto delimiter; +- } +- if (*text == *token) { +- text++; +- goto delimiter; +- } +- return 0; +- +-delimiter: +- SKIP_WS(text); +- if (*text == ':') { +- *text_p = text+1; +- return 1; +- } +- if (*text == ',' || *text == '\0') { +- *text_p = text; +- return 1; +- } +- return 0; +-} +- +- +-static char * +-get_token( +- const char **text_p) +-{ +- char *token = NULL, *t; +- const char *bp, *ep; +- +- bp = *text_p; +- SKIP_WS(bp); +- ep = bp; +- +- while (*ep!='\0' && *ep!='\r' && *ep!='\n' && *ep!=':' && *ep!=',') +- ep++; +- if (ep == bp) +- goto after_token; +- token = (char*)malloc(ep - bp + 1); +- if (token == NULL) +- goto after_token; +- memcpy(token, bp, ep - bp); +- +- /* Trim trailing whitespace */ +- t = token + (ep - bp - 1); +- while (t >= token && +- (*t==' ' || *t=='\t' || *t=='\n' || *t=='\r')) +- t--; +- *(t+1) = '\0'; +- +-after_token: +- if (*ep == ':') +- ep++; +- *text_p = ep; +- return token; +-} +- +- +-static int +-get_id( +- const char *token, +- id_t *id_p) +-{ +- char *ep; +- long l; +- l = strtol(token, &ep, 0); +- if (*ep != '\0') +- return -1; +- if (l < 0) { +- /* +- Negative values are interpreted as 16-bit numbers, +- so that id -2 maps to 65534 (nobody/nogroup), etc. +- */ +- l &= 0xFFFF; +- } +- *id_p = l; +- return 0; +-} +- +- +-static int +-get_uid( +- const char *token, +- uid_t *uid_p) +-{ +- struct passwd *passwd; +- +- if (get_id(token, (id_t *)uid_p) == 0) +- goto accept; +- passwd = getpwnam(token); +- if (passwd) { +- *uid_p = passwd->pw_uid; +- goto accept; +- } +- return -1; +- +-accept: +- return 0; +-} +- +- +-static int +-get_gid( +- const char *token, +- gid_t *gid_p) +-{ +- struct group *group; +- +- if (get_id(token, (id_t *)gid_p) == 0) +- goto accept; +- group = getgrnam(token); +- if (group) { +- *gid_p = group->gr_gid; +- goto accept; +- } +- return -1; +- +-accept: +- return 0; +-} +- +- +-/* +- Parses the next acl entry in text_p. +- +- Returns: +- -1 on error, 0 on success. +-*/ +- +-cmd_t +-parse_acl_cmd( +- const char **text_p, +- int seq_cmd, +- int parse_mode) +-{ +- cmd_t cmd = cmd_init(); +- char *str; +- const char *backup; +- int error, perm_chars; +- if (!cmd) +- return NULL; +- +- cmd->c_cmd = seq_cmd; +- if (parse_mode & SEQ_PROMOTE_ACL) +- cmd->c_type = ACL_TYPE_DEFAULT; +- else +- cmd->c_type = ACL_TYPE_ACCESS; +- cmd->c_id = ACL_UNDEFINED_ID; +- cmd->c_perm = 0; +- +- if (parse_mode & SEQ_PARSE_DEFAULT) { +- /* check for default acl entry */ +- backup = *text_p; +- if (skip_tag_name(text_p, "default")) { +- if (parse_mode & SEQ_PROMOTE_ACL) { +- /* if promoting from acl to default acl and +- a default acl entry is found, fail. */ +- *text_p = backup; +- goto fail; +- } +- cmd->c_type = ACL_TYPE_DEFAULT; +- } +- } +- +- /* parse acl entry type */ +- switch (**text_p) { +- case 'u': /* user */ +- skip_tag_name(text_p, "user"); +- +-user_entry: +- backup = *text_p; +- str = get_token(text_p); +- if (str) { +- cmd->c_tag = ACL_USER; +- error = get_uid(unquote(str), &cmd->c_id); +- free(str); +- if (error) { +- *text_p = backup; +- goto fail; +- } +- } else { +- cmd->c_tag = ACL_USER_OBJ; +- } +- break; +- +- case 'g': /* group */ +- if (!skip_tag_name(text_p, "group")) +- goto user_entry; +- +- backup = *text_p; +- str = get_token(text_p); +- if (str) { +- cmd->c_tag = ACL_GROUP; +- error = get_gid(unquote(str), &cmd->c_id); +- free(str); +- if (error) { +- *text_p = backup; +- goto fail; +- } +- } else { +- cmd->c_tag = ACL_GROUP_OBJ; +- } +- break; +- +- case 'o': /* other */ +- if (!skip_tag_name(text_p, "other")) +- goto user_entry; +- /* skip empty entry qualifier field (this field may +- be missing for compatibility with Solaris.) */ +- SKIP_WS(*text_p); +- if (**text_p == ':') +- (*text_p)++; +- cmd->c_tag = ACL_OTHER; +- break; +- +- case 'm': /* mask */ +- if (!skip_tag_name(text_p, "mask")) +- goto user_entry; +- /* skip empty entry qualifier field (this field may +- be missing for compatibility with Solaris.) */ +- SKIP_WS(*text_p); +- if (**text_p == ':') +- (*text_p)++; +- cmd->c_tag = ACL_MASK; +- break; +- +- default: /* assume "user:" */ +- goto user_entry; +- } +- +- SKIP_WS(*text_p); +- if (**text_p == ',' || **text_p == '\0') { +- if (parse_mode & SEQ_PARSE_NO_PERM) +- return cmd; +- else +- goto fail; +- } +- if (!(parse_mode & SEQ_PARSE_WITH_PERM)) +- return cmd; +- +- /* parse permissions */ +- SKIP_WS(*text_p); +- if (**text_p >= '0' && **text_p <= '7') { +- cmd->c_perm = 0; +- while (**text_p == '0') +- (*text_p)++; +- if (**text_p >= '1' && **text_p <= '7') { +- cmd->c_perm = (*(*text_p)++ - '0'); +- } +- +- return cmd; +- } +- +- for (perm_chars=0; perm_chars<3; perm_chars++, (*text_p)++) { +- switch(**text_p) { +- case 'r': /* read */ +- if (cmd->c_perm & CMD_PERM_READ) +- goto fail; +- cmd->c_perm |= CMD_PERM_READ; +- break; +- +- case 'w': /* write */ +- if (cmd->c_perm & CMD_PERM_WRITE) +- goto fail; +- cmd->c_perm |= CMD_PERM_WRITE; +- break; +- +- case 'x': /* execute */ +- if (cmd->c_perm & CMD_PERM_EXECUTE) +- goto fail; +- cmd->c_perm |= CMD_PERM_EXECUTE; +- break; +- +- case 'X': /* execute only if directory or some +- entries already have execute permissions +- set */ +- if (cmd->c_perm & CMD_PERM_COND_EXECUTE) +- goto fail; +- cmd->c_perm |= CMD_PERM_COND_EXECUTE; +- break; +- +- case '-': +- /* ignore */ +- break; +- +- default: +- if (perm_chars == 0) +- goto fail; +- return cmd; +- } +- } +- if (perm_chars != 3) +- goto fail; +- return cmd; +- +-fail: +- cmd_free(cmd); +- return NULL; +-} +- +- +-/* +- Parse a comma-separated list of acl entries. +- +- which is set to the index of the first character that was not parsed, +- or -1 in case of success. +-*/ +-int +-parse_acl_seq( +- seq_t seq, +- const char *text_p, +- int *which, +- int seq_cmd, +- int parse_mode) +-{ +- const char *initial_text_p = text_p; +- cmd_t cmd; +- +- if (which) +- *which = -1; +- +- while (*text_p != '\0') { +- cmd = parse_acl_cmd(&text_p, seq_cmd, parse_mode); +- if (cmd == NULL) { +- errno = EINVAL; +- goto fail; +- } +- if (seq_append(seq, cmd) != 0) { +- cmd_free(cmd); +- goto fail; +- } +- SKIP_WS(text_p); +- if (*text_p != ',') +- break; +- text_p++; +- } +- +- if (*text_p != '\0') { +- errno = EINVAL; +- goto fail; +- } +- +- return 0; +- +-fail: +- if (which) +- *which = (text_p - initial_text_p); +- return -1; +-} +- +- +- +-int +-read_acl_comments( +- FILE *file, +- int *line, +- char **path_p, +- uid_t *uid_p, +- gid_t *gid_p, +- mode_t *flags) +-{ +- int c; +- /* +- Max PATH_MAX bytes even for UTF-8 path names and additional 9 +- 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; +- int comments_read = 0; +- +- if (path_p) +- *path_p = NULL; +- if (uid_p) +- *uid_p = ACL_UNDEFINED_ID; +- if (gid_p) +- *gid_p = ACL_UNDEFINED_ID; +- if (flags) +- *flags = 0; +- +- for(;;) { +- c = fgetc(file); +- if (c == EOF) +- break; +- if (c==' ' || c=='\t' || c=='\r' || c=='\n') { +- if (c=='\n') +- (*line)++; +- continue; +- } +- if (c != '#') { +- ungetc(c, file); +- break; +- } +- if (line) +- (*line)++; +- +- if (fgets(linebuf, sizeof(linebuf), file) == NULL) +- break; +- +- comments_read = 1; +- +- p = strrchr(linebuf, '\0'); +- while (p > linebuf && +- (*(p-1)=='\r' || *(p-1)=='\n')) { +- p--; +- *p = '\0'; +- } +- +- cp = linebuf; +- SKIP_WS(cp); +- if (strncmp(cp, "file:", 5) == 0) { +- cp += 5; +- SKIP_WS(cp); +- cp = unquote(cp); +- +- if (path_p) { +- if (*path_p) +- goto fail; +- *path_p = (char*)malloc(strlen(cp)+1); +- if (!*path_p) +- return -1; +- strcpy(*path_p, cp); +- } +- } else if (strncmp(cp, "owner:", 6) == 0) { +- cp += 6; +- SKIP_WS(cp); +- +- if (uid_p) { +- if (*uid_p != ACL_UNDEFINED_ID) +- goto fail; +- if (get_uid(unquote(cp), uid_p) != 0) +- continue; +- } +- } else if (strncmp(cp, "group:", 6) == 0) { +- cp += 6; +- SKIP_WS(cp); +- +- if (gid_p) { +- if (*gid_p != ACL_UNDEFINED_ID) +- goto fail; +- if (get_gid(unquote(cp), gid_p) != 0) +- continue; +- } +- } else if (strncmp(cp, "flags:", 6) == 0) { +- mode_t f = 0; +- +- cp += 6; +- SKIP_WS(cp); +- +- if (cp[0] == 's') +- f |= S_ISUID; +- else if (cp[0] != '-') +- goto fail; +- if (cp[1] == 's') +- f |= S_ISGID; +- else if (cp[1] != '-') +- goto fail; +- if (cp[2] == 't') +- f |= S_ISVTX; +- else if (cp[2] != '-') +- goto fail; +- if (cp[3] != '\0') +- goto fail; +- +- if (flags) +- *flags = f; +- } +- } +- if (ferror(file)) +- return -1; +- return comments_read; +-fail: +- if (path_p && *path_p) { +- free(*path_p); +- *path_p = NULL; +- } +- return -EINVAL; +-} +- +- +-int +-read_acl_seq( +- FILE *file, +- seq_t seq, +- int seq_cmd, +- int parse_mode, +- int *line, +- int *which) +-{ +- char linebuf[1024]; +- const char *cp; +- cmd_t cmd; +- +- if (which) +- *which = -1; +- +- for(;;) { +- if (fgets(linebuf, sizeof(linebuf), file) == NULL) +- break; +- if (line) +- (*line)++; +- +- cp = linebuf; +- SKIP_WS(cp); +- if (*cp == '\0') { +- if (!(parse_mode & SEQ_PARSE_MULTI)) +- continue; +- break; +- } else if (*cp == '#') { +- continue; +- } +- +- cmd = parse_acl_cmd(&cp, seq_cmd, parse_mode); +- if (cmd == NULL) { +- errno = EINVAL; +- goto fail; +- } +- if (seq_append(seq, cmd) != 0) { +- cmd_free(cmd); +- goto fail; +- } +- +- SKIP_WS(cp); +- if (*cp != '\0' && *cp != '#') { +- errno = EINVAL; +- goto fail; +- } +- } +- +- if (ferror(file)) +- goto fail; +- return 0; +- +-fail: +- if (which) +- *which = (cp - linebuf); +- return -1; +-} +- +diff --git a/setfacl/parse.h b/setfacl/parse.h +deleted file mode 100644 +index b2e68b4..0000000 +--- a/setfacl/parse.h ++++ /dev/null +@@ -1,85 +0,0 @@ +-/* +- File: parse.h +- (Linux Access Control List Management) +- +- Copyright (C) 1999 by Andreas Gruenbacher +- +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#ifndef __PARSE_H +-#define __PARSE_H +- +- +-#include +-#include +-#include "sequence.h" +- +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +- +-/* parse options */ +- +-#define SEQ_PARSE_WITH_PERM (0x0001) +-#define SEQ_PARSE_NO_PERM (0x0002) +-#define SEQ_PARSE_ANY_PERM (0x0001|0x0002) +- +-#define SEQ_PARSE_MULTI (0x0010) +-#define SEQ_PARSE_DEFAULT (0x0020) /* "default:" = default acl */ +- +-#define SEQ_PROMOTE_ACL (0x0040) /* promote from acl +- to default acl */ +- +-cmd_t +-parse_acl_cmd( +- const char **text_p, +- int seq_cmd, +- int parse_mode); +-int +-parse_acl_seq( +- seq_t seq, +- const char *text_p, +- int *which, +- int seq_cmd, +- int parse_mode); +-int +-read_acl_comments( +- FILE *file, +- int *line, +- char **path_p, +- uid_t *uid_p, +- gid_t *gid_p, +- mode_t *flags); +-int +-read_acl_seq( +- FILE *file, +- seq_t seq, +- int seq_cmd, +- int parse_mode, +- int *line, +- int *which); +- +- +-#ifdef __cplusplus +-} +-#endif +- +- +-#endif /* __PARSE_H */ +- +diff --git a/setfacl/sequence.c b/setfacl/sequence.c +deleted file mode 100644 +index a418b23..0000000 +--- a/setfacl/sequence.c ++++ /dev/null +@@ -1,162 +0,0 @@ +-/* +- File: sequence.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999, 2000 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +- +-#include +-#include "sequence.h" +- +- +-cmd_t +-cmd_init( +- void) +-{ +- return (cmd_t)malloc(sizeof(struct cmd_obj)); +-} +- +- +-void +-cmd_free( +- cmd_t cmd) +-{ +- free(cmd); +-} +- +- +-seq_t +-seq_init( +- void) +-{ +- seq_t seq = (seq_t)malloc(sizeof(struct seq_obj)); +- if (seq == NULL) +- return NULL; +- seq->s_first = seq->s_last = NULL; +- return seq; +-} +- +- +-int +-seq_free( +- seq_t seq) +-{ +- cmd_t cmd = seq->s_first; +- while (cmd) { +- seq->s_first = seq->s_first->c_next; +- cmd_free(cmd); +- cmd = seq->s_first; +- } +- free(seq); +- return 0; +-} +- +- +-int +-seq_empty( +- seq_t seq) +-{ +- return (seq->s_first == NULL); +-} +- +- +-int +-seq_append( +- seq_t seq, +- cmd_t cmd) +-{ +- cmd->c_next = NULL; +- if (seq->s_first == NULL) { +- seq->s_first = seq->s_last = cmd; +- } else { +- seq->s_last->c_next = cmd; +- seq->s_last = cmd; +- } +- return 0; +-} +- +- +-int +-seq_append_cmd( +- seq_t seq, +- cmd_tag_t cmd, +- acl_type_t type) +-{ +- cmd_t cmd_d = cmd_init(); +- if (cmd_d == NULL) +- return -1; +- cmd_d->c_cmd = cmd; +- cmd_d->c_type = type; +- if (seq_append(seq, cmd_d) != 0) { +- cmd_free(cmd_d); +- return -1; +- } +- return 0; +-} +- +- +-int +-seq_get_cmd( +- seq_t seq, +- int which, +- cmd_t *cmd) +-{ +- if (which == SEQ_FIRST_CMD) { +- if (seq->s_first == NULL) +- return 0; +- if (cmd) +- *cmd = seq->s_first; +- return 1; +- } else if (which == SEQ_NEXT_CMD) { +- if (cmd == NULL) +- return -1; +- if (*cmd) { +- *cmd = (*cmd)->c_next; +- return (*cmd == NULL) ? 0 : 1; +- } +- return 0; +- } else { +- return -1; +- } +-} +- +- +-int +-seq_delete_cmd( +- seq_t seq, +- cmd_t cmd) +-{ +- cmd_t prev = seq->s_first; +- +- if (cmd == seq->s_first) { +- seq->s_first = seq->s_first->c_next; +- cmd_free(cmd); +- return 0; +- } +- while (prev != NULL && prev->c_next != cmd) +- prev = prev->c_next; +- if (prev == NULL) +- return -1; +- if (cmd == seq->s_last) +- seq->s_last = prev; +- prev->c_next = cmd->c_next; +- cmd_free(cmd); +- return 0; +-} +- +diff --git a/setfacl/sequence.h b/setfacl/sequence.h +deleted file mode 100644 +index c5d7403..0000000 +--- a/setfacl/sequence.h ++++ /dev/null +@@ -1,115 +0,0 @@ +-/* +- File: sequence.h +- (Linux Access Control List Management) +- +- Copyright (C) 1999 by Andreas Gruenbacher +- +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +- +-#ifndef __SEQUENCE_H +-#define __SEQUENCE_H +- +- +-#include +- +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +- +-typedef unsigned int cmd_tag_t; +- +-struct cmd_obj { +- cmd_tag_t c_cmd; +- acl_type_t c_type; +- acl_tag_t c_tag; +- uid_t c_id; +- mode_t c_perm; +- struct cmd_obj *c_next; +-}; +- +-typedef struct cmd_obj *cmd_t; +- +-struct seq_obj { +- cmd_t s_first; +- cmd_t s_last; +-}; +- +-typedef struct seq_obj *seq_t; +- +-/* command types */ +-#define CMD_ENTRY_REPLACE (0) +-#define CMD_REMOVE_ENTRY (3) +-#define CMD_REMOVE_EXTENDED_ACL (4) +-#define CMD_REMOVE_ACL (5) +- +-/* constants for permission specifiers */ +-#define CMD_PERM_READ (4) +-#define CMD_PERM_WRITE (2) +-#define CMD_PERM_EXECUTE (1) +-#define CMD_PERM_COND_EXECUTE (8) +- +-/* iteration over command sequence */ +-#define SEQ_FIRST_CMD (0) +-#define SEQ_NEXT_CMD (1) +- +-/* command sequence manipulation */ +- +-cmd_t +-cmd_init( +- void); +-void +-cmd_free( +- cmd_t cmd); +-seq_t +-seq_init( +- void); +-int +-seq_free( +- seq_t seq); +-int +-seq_empty( +- seq_t seq); +-int +-seq_append( +- seq_t seq, +- cmd_t cmd); +-int +-seq_append_cmd( +- seq_t seq, +- cmd_tag_t cmd, +- acl_type_t type); +-int +-seq_get_cmd( +- seq_t seq, +- int which, +- cmd_t *cmd); +-int +-seq_delete_cmd( +- seq_t seq, +- cmd_t cmd); +- +- +-#ifdef __cplusplus +-} +-#endif +- +- +-#endif /* __SEQUENCE_H */ +- +diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c +deleted file mode 100644 +index f6135b7..0000000 +--- a/setfacl/setfacl.c ++++ /dev/null +@@ -1,669 +0,0 @@ +-/* +- File: setfacl.c +- (Linux Access Control List Management) +- +- Copyright (C) 1999-2002 +- Andreas Gruenbacher, +- +- This program is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with this library; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-*/ +- +-#include "config.h" +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "misc.h" +-#include "sequence.h" +-#include "parse.h" +-#include "do_set.h" +-#include "walk_tree.h" +- +-#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT" +- +-/* '-' stands for `process non-option arguments in loop' */ +-#if !POSIXLY_CORRECT +-# define CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:RLP" +-# define CMD_LINE_SPEC "[-bkndRLP] { -m|-M|-x|-X ... } file ..." +-#endif +-#define POSIXLY_CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:" +-#define POSIXLY_CMD_LINE_SPEC "[-bknd] {-m|-M|-x|-X ... } file ..." +- +-struct option long_options[] = { +-#if !POSIXLY_CORRECT +- { "set", 1, 0, 's' }, +- { "set-file", 1, 0, 'S' }, +- +- { "mask", 0, 0, 'r' }, +- { "recursive", 0, 0, 'R' }, +- { "logical", 0, 0, 'L' }, +- { "physical", 0, 0, 'P' }, +- { "restore", 1, 0, 'B' }, +- { "test", 0, 0, 't' }, +-#endif +- { "modify", 1, 0, 'm' }, +- { "modify-file", 1, 0, 'M' }, +- { "remove", 1, 0, 'x' }, +- { "remove-file", 1, 0, 'X' }, +- +- { "default", 0, 0, 'd' }, +- { "no-mask", 0, 0, 'n' }, +- { "remove-all", 0, 0, 'b' }, +- { "remove-default", 0, 0, 'k' }, +- { "version", 0, 0, 'v' }, +- { "help", 0, 0, 'h' }, +- { NULL, 0, 0, 0 }, +-}; +- +-const char *progname; +-const char *cmd_line_options, *cmd_line_spec; +- +-int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL; +-int opt_recalculate; /* recalculate mask entry (0=default, 1=yes, -1=no) */ +-int opt_promote; /* promote access ACL to default ACL */ +-int opt_test; /* do not write to the file system. +- Print what would happen instead. */ +-#if POSIXLY_CORRECT +-const int posixly_correct = 1; /* Posix compatible behavior! */ +-#else +-int posixly_correct; /* Posix compatible behavior? */ +-#endif +-int chown_error; +-int promote_warning; +- +- +-static const char *xquote(const char *str, const char *quote_chars) +-{ +- const char *q = quote(str, quote_chars); +- if (q == NULL) { +- fprintf(stderr, "%s: %s\n", progname, strerror(errno)); +- exit(1); +- } +- return q; +-} +- +-int +-has_any_of_type( +- cmd_t cmd, +- acl_type_t acl_type) +-{ +- while (cmd) { +- if (cmd->c_type == acl_type) +- return 1; +- cmd = cmd->c_next; +- } +- return 0; +-} +- +- +-#if !POSIXLY_CORRECT +-int +-restore( +- FILE *file, +- const char *filename) +-{ +- char *path_p; +- struct stat st; +- uid_t uid; +- gid_t gid; +- mode_t mask, flags; +- struct do_set_args args = { }; +- int line = 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, +- &flags); +- if (error < 0) { +- error = -error; +- goto fail; +- } +- if (error == 0) +- return status; +- +- if (path_p == NULL) { +- if (filename) { +- fprintf(stderr, _("%s: %s: No filename found " +- "in line %d, aborting\n"), +- progname, xquote(filename, "\n\r"), +- backup_line); +- } else { +- fprintf(stderr, _("%s: No filename found in " +- "line %d of standard input, " +- "aborting\n"), +- progname, backup_line); +- } +- status = 1; +- goto getout; +- } +- +- if (!(args.seq = seq_init())) +- goto fail_errno; +- if (seq_append_cmd(args.seq, CMD_REMOVE_ACL, ACL_TYPE_ACCESS) || +- seq_append_cmd(args.seq, CMD_REMOVE_ACL, ACL_TYPE_DEFAULT)) +- goto fail_errno; +- +- error = read_acl_seq(file, args.seq, CMD_ENTRY_REPLACE, +- SEQ_PARSE_WITH_PERM | +- SEQ_PARSE_DEFAULT | +- SEQ_PARSE_MULTI, +- &line, NULL); +- if (error != 0) { +- fprintf(stderr, _("%s: %s: %s in line %d\n"), +- progname, xquote(filename, "\n\r"), strerror(errno), +- line); +- status = 1; +- goto getout; +- } +- +- error = stat(path_p, &st); +- if (opt_test && error != 0) { +- fprintf(stderr, "%s: %s: %s\n", progname, +- xquote(path_p, "\n\r"), strerror(errno)); +- status = 1; +- } +- +- args.mode = 0; +- error = do_set(path_p, &st, 0, &args); +- if (error != 0) { +- status = 1; +- goto resume; +- } +- +- if (uid != ACL_UNDEFINED_ID && uid != st.st_uid) +- st.st_uid = uid; +- else +- st.st_uid = -1; +- if (gid != ACL_UNDEFINED_ID && gid != st.st_gid) +- st.st_gid = gid; +- else +- st.st_gid = -1; +- if (!opt_test && +- (st.st_uid != -1 || st.st_gid != -1)) { +- if (chown(path_p, st.st_uid, st.st_gid) != 0) { +- fprintf(stderr, _("%s: %s: Cannot change " +- "owner/group: %s\n"), +- progname, xquote(path_p, "\n\r"), +- strerror(errno)); +- status = 1; +- } +- +- /* chown() clears setuid/setgid so force a chmod if +- * S_ISUID/S_ISGID was expected */ +- if ((st.st_mode & flags) & (S_ISUID | S_ISGID)) +- chmod_required = 1; +- } +- +- mask = S_ISUID | S_ISGID | S_ISVTX; +- if (chmod_required || ((st.st_mode & mask) != (flags & mask))) { +- if (!args.mode) +- args.mode = st.st_mode; +- args.mode &= (S_IRWXU | S_IRWXG | S_IRWXO); +- if (chmod(path_p, flags | args.mode) != 0) { +- fprintf(stderr, _("%s: %s: Cannot change " +- "mode: %s\n"), +- progname, xquote(path_p, "\n\r"), +- strerror(errno)); +- status = 1; +- } +- } +-resume: +- if (path_p) { +- free(path_p); +- path_p = NULL; +- } +- if (args.seq) { +- seq_free(args.seq); +- args.seq = NULL; +- } +- } +- +-getout: +- if (path_p) { +- free(path_p); +- path_p = NULL; +- } +- if (args.seq) { +- seq_free(args.seq); +- args.seq = NULL; +- } +- return status; +- +-fail_errno: +- error = errno; +-fail: +- fprintf(stderr, "%s: %s: %s\n", progname, xquote(filename, "\n\r"), +- strerror(error)); +- status = 1; +- goto getout; +-} +-#endif +- +- +-void help(void) +-{ +- printf(_("%s %s -- set file access control lists\n"), +- progname, VERSION); +- printf(_("Usage: %s %s\n"), +- progname, cmd_line_spec); +- printf(_( +-" -m, --modify=acl modify the current ACL(s) of file(s)\n" +-" -M, --modify-file=file read ACL entries to modify from file\n" +-" -x, --remove=acl remove entries from the ACL(s) of file(s)\n" +-" -X, --remove-file=file read ACL entries to remove from file\n" +-" -b, --remove-all remove all extended ACL entries\n" +-" -k, --remove-default remove the default ACL\n")); +-#if !POSIXLY_CORRECT +- if (!posixly_correct) { +- printf(_( +-" --set=acl set the ACL of file(s), replacing the current ACL\n" +-" --set-file=file read ACL entries to set from file\n" +-" --mask do recalculate the effective rights mask\n")); +- } +-#endif +- printf(_( +-" -n, --no-mask don't recalculate the effective rights mask\n" +-" -d, --default operations apply to the default ACL\n")); +-#if !POSIXLY_CORRECT +- if (!posixly_correct) { +- printf(_( +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P, --physical physical walk, do not follow symbolic links\n" +-" --restore=file restore ACLs (inverse of `getfacl -R')\n" +-" --test test mode (ACLs are not modified)\n")); +- } +-#endif +- printf(_( +-" -v, --version print version and exit\n" +-" -h, --help this help text\n")); +-} +- +- +-int next_file(const char *arg, seq_t seq) +-{ +- char *line; +- int errors = 0; +- struct do_set_args args; +- +- args.seq = seq; +- +- if (strcmp(arg, "-") == 0) { +- while ((line = next_line(stdin))) +- errors = walk_tree(line, walk_flags, 0, do_set, &args); +- if (!feof(stdin)) { +- fprintf(stderr, _("%s: Standard input: %s\n"), +- progname, strerror(errno)); +- errors = 1; +- } +- } else { +- errors = walk_tree(arg, walk_flags, 0, do_set, &args); +- } +- return errors ? 1 : 0; +-} +- +- +-#define ERRNO_ERROR(s) \ +- ({status = (s); goto errno_error; }) +- +- +-int main(int argc, char *argv[]) +-{ +- int opt; +- int saw_files = 0; +- int status = 0; +- FILE *file; +- int which; +- int lineno; +- int error; +- seq_t seq; +- int seq_cmd, parse_mode; +- +- progname = basename(argv[0]); +- +-#if POSIXLY_CORRECT +- cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; +- cmd_line_spec = _(POSIXLY_CMD_LINE_SPEC); +-#else +- if (getenv(POSIXLY_CORRECT_STR)) +- posixly_correct = 1; +- if (!posixly_correct) { +- cmd_line_options = CMD_LINE_OPTIONS; +- cmd_line_spec = _(CMD_LINE_SPEC); +- } else { +- cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; +- cmd_line_spec = _(POSIXLY_CMD_LINE_SPEC); +- } +-#endif +- +- setlocale(LC_CTYPE, ""); +- setlocale(LC_MESSAGES, ""); +- bindtextdomain(PACKAGE, LOCALEDIR); +- textdomain(PACKAGE); +- +- seq = seq_init(); +- if (!seq) +- ERRNO_ERROR(1); +- +- while ((opt = getopt_long(argc, argv, cmd_line_options, +- long_options, NULL)) != -1) { +- /* we remember the two REMOVE_ACL commands of the set +- operations because we may later need to delete them. */ +- cmd_t seq_remove_default_acl_cmd = NULL; +- cmd_t seq_remove_acl_cmd = NULL; +- +- if (opt != '\1' && saw_files) { +- seq_free(seq); +- seq = seq_init(); +- if (!seq) +- ERRNO_ERROR(1); +- saw_files = 0; +- } +- +- switch (opt) { +- case 'b': /* remove all extended entries */ +- if (seq_append_cmd(seq, CMD_REMOVE_EXTENDED_ACL, +- ACL_TYPE_ACCESS) || +- seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_DEFAULT)) +- ERRNO_ERROR(1); +- break; +- +- case 'k': /* remove default ACL */ +- if (seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_DEFAULT)) +- ERRNO_ERROR(1); +- break; +- +- case 'n': /* do not recalculate mask */ +- opt_recalculate = -1; +- break; +- +- case 'r': /* force recalculate mask */ +- opt_recalculate = 1; +- break; +- +- case 'd': /* operations apply to default ACL */ +- opt_promote = 1; +- break; +- +- case 's': /* set */ +- if (seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_ACCESS)) +- ERRNO_ERROR(1); +- seq_remove_acl_cmd = seq->s_last; +- if (seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_DEFAULT)) +- ERRNO_ERROR(1); +- seq_remove_default_acl_cmd = seq->s_last; +- +- seq_cmd = CMD_ENTRY_REPLACE; +- parse_mode = SEQ_PARSE_WITH_PERM; +- goto set_modify_delete; +- +- case 'm': /* modify */ +- seq_cmd = CMD_ENTRY_REPLACE; +- parse_mode = SEQ_PARSE_WITH_PERM; +- goto set_modify_delete; +- +- case 'x': /* delete */ +- seq_cmd = CMD_REMOVE_ENTRY; +-#if POSIXLY_CORRECT +- parse_mode = SEQ_PARSE_ANY_PERM; +-#else +- if (posixly_correct) +- parse_mode = SEQ_PARSE_ANY_PERM; +- else +- parse_mode = SEQ_PARSE_NO_PERM; +-#endif +- goto set_modify_delete; +- +- set_modify_delete: +- if (!posixly_correct) +- parse_mode |= SEQ_PARSE_DEFAULT; +- if (opt_promote) +- parse_mode |= SEQ_PROMOTE_ACL; +- if (parse_acl_seq(seq, optarg, &which, +- seq_cmd, parse_mode) != 0) { +- if (which < 0 || +- (size_t) which >= strlen(optarg)) { +- fprintf(stderr, _( +- "%s: Option " +- "-%c incomplete\n"), +- progname, opt); +- } else { +- fprintf(stderr, _( +- "%s: Option " +- "-%c: %s near " +- "character %d\n"), +- progname, opt, +- strerror(errno), +- which+1); +- } +- status = 2; +- goto cleanup; +- } +- break; +- +- case 'S': /* set from file */ +- if (seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_ACCESS)) +- ERRNO_ERROR(1); +- seq_remove_acl_cmd = seq->s_last; +- if (seq_append_cmd(seq, CMD_REMOVE_ACL, +- ACL_TYPE_DEFAULT)) +- ERRNO_ERROR(1); +- seq_remove_default_acl_cmd = seq->s_last; +- +- seq_cmd = CMD_ENTRY_REPLACE; +- parse_mode = SEQ_PARSE_WITH_PERM; +- goto set_modify_delete_from_file; +- +- case 'M': /* modify from file */ +- seq_cmd = CMD_ENTRY_REPLACE; +- parse_mode = SEQ_PARSE_WITH_PERM; +- goto set_modify_delete_from_file; +- +- case 'X': /* delete from file */ +- seq_cmd = CMD_REMOVE_ENTRY; +-#if POSIXLY_CORRECT +- parse_mode = SEQ_PARSE_ANY_PERM; +-#else +- if (posixly_correct) +- parse_mode = SEQ_PARSE_ANY_PERM; +- else +- parse_mode = SEQ_PARSE_NO_PERM; +-#endif +- goto set_modify_delete_from_file; +- +- set_modify_delete_from_file: +- if (!posixly_correct) +- parse_mode |= SEQ_PARSE_DEFAULT; +- if (opt_promote) +- parse_mode |= SEQ_PROMOTE_ACL; +- if (strcmp(optarg, "-") == 0) { +- file = stdin; +- } else { +- file = fopen(optarg, "r"); +- if (file == NULL) { +- fprintf(stderr, "%s: %s: %s\n", +- progname, +- xquote(optarg, "\n\r"), +- strerror(errno)); +- status = 2; +- goto cleanup; +- } +- } +- +- lineno = 0; +- error = read_acl_seq(file, seq, seq_cmd, +- parse_mode, &lineno, NULL); +- +- if (file != stdin) { +- fclose(file); +- } +- +- if (error) { +- if (!errno) +- errno = EINVAL; +- +- if (file != stdin) { +- fprintf(stderr, _( +- "%s: %s in line " +- "%d of file %s\n"), +- progname, +- strerror(errno), +- lineno, +- xquote(optarg, "\n\r")); +- } else { +- fprintf(stderr, _( +- "%s: %s in line " +- "%d of standard " +- "input\n"), progname, +- strerror(errno), +- lineno); +- } +- status = 2; +- goto cleanup; +- } +- break; +- +- +- case '\1': /* file argument */ +- if (seq_empty(seq)) +- goto synopsis; +- saw_files = 1; +- +- status = next_file(optarg, seq); +- break; +- +- case 'B': /* restore ACL backup */ +- saw_files = 1; +- +- if (strcmp(optarg, "-") == 0) +- file = stdin; +- else { +- file = fopen(optarg, "r"); +- if (file == NULL) { +- fprintf(stderr, "%s: %s: %s\n", +- progname, +- xquote(optarg, "\n\r"), +- strerror(errno)); +- status = 2; +- goto cleanup; +- } +- } +- +- status = restore(file, +- (file == stdin) ? NULL : optarg); +- +- if (file != stdin) +- fclose(file); +- if (status != 0) +- goto cleanup; +- break; +- +- case 'R': /* recursive */ +- walk_flags |= WALK_TREE_RECURSIVE; +- break; +- +- case 'L': /* follow symlinks */ +- walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE; +- walk_flags &= ~WALK_TREE_PHYSICAL; +- break; +- +- case 'P': /* do not follow symlinks */ +- walk_flags |= WALK_TREE_PHYSICAL; +- walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE | +- WALK_TREE_DEREFERENCE_TOPLEVEL); +- break; +- +- case 't': /* test mode */ +- opt_test = 1; +- break; +- +- case 'v': /* print version and exit */ +- printf("%s " VERSION "\n", progname); +- status = 0; +- goto cleanup; +- +- case 'h': /* help! */ +- help(); +- status = 0; +- goto cleanup; +- +- case ':': /* option missing */ +- case '?': /* unknown option */ +- default: +- goto synopsis; +- } +- if (seq_remove_acl_cmd) { +- /* This was a set operation. Check if there are +- actually entries of ACL_TYPE_ACCESS; if there +- are none, we need to remove this command! */ +- if (!has_any_of_type(seq_remove_acl_cmd->c_next, +- ACL_TYPE_ACCESS)) +- seq_delete_cmd(seq, seq_remove_acl_cmd); +- } +- if (seq_remove_default_acl_cmd) { +- /* This was a set operation. Check if there are +- actually entries of ACL_TYPE_DEFAULT; if there +- are none, we need to remove this command! */ +- if (!has_any_of_type(seq_remove_default_acl_cmd->c_next, +- ACL_TYPE_DEFAULT)) +- seq_delete_cmd(seq, seq_remove_default_acl_cmd); +- } +- } +- while (optind < argc) { +- if(!seq) +- goto synopsis; +- if (seq_empty(seq)) +- goto synopsis; +- saw_files = 1; +- +- status = next_file(argv[optind++], seq); +- } +- if (!saw_files) +- goto synopsis; +- +- goto cleanup; +- +-synopsis: +- fprintf(stderr, _("Usage: %s %s\n"), +- progname, cmd_line_spec); +- fprintf(stderr, _("Try `%s --help' for more information.\n"), +- progname); +- status = 2; +- goto cleanup; +- +-errno_error: +- fprintf(stderr, "%s: %s\n", progname, strerror(errno)); +- goto cleanup; +- +-cleanup: +- if (seq) +- seq_free(seq); +- return status; +-} +- +diff --git a/test/.gitignore b/test/.gitignore +new file mode 100644 +index 0000000..e6e5019 +--- /dev/null ++++ b/test/.gitignore +@@ -0,0 +1 @@ ++*.dir/ +diff --git a/test/Makefile b/test/Makefile +deleted file mode 100644 +index d2baac8..0000000 +--- a/test/Makefile ++++ /dev/null +@@ -1,50 +0,0 @@ +-# +-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +- +-TOPDIR = .. +-include $(TOPDIR)/include/builddefs +- +-TESTS = $(wildcard *.test) +-ROOT = $(wildcard root/*.test) +-NFS = $(wildcard nfs/*.test) +-LSRCFILES = sort-getfacl-output run make-tree $(TESTS) $(ROOT) $(NFS) \ +- malformed-restore-double-owner.acl +- +-include $(BUILDRULES) +- +-default install install-dev install-lib: +- +-PATH := $(abspath ../getfacl/):$(abspath ../setfacl/):$(abspath ../chacl/):$(PATH) +- +-tests: $(TESTS) +-root-tests: $(ROOT) +-nfs-tests: $(NFS) +- +-$(TESTS): +- @echo "*** $@ ***"; perl run $@ +- +-$(NFS): +- @echo "NFS specific tests"; echo "*** $@ ***"; perl run $@ +- +-$(ROOT): +- @echo "Note: Tests must run as root"; echo "*** $@ ***"; perl run $@ +- +-.PHONY: $(TESTS) $(NFS) $(ROOT) +-.NOTPARALLEL: +- +- +diff --git a/test/Makemodule.am b/test/Makemodule.am +new file mode 100644 +index 0000000..7b8dafe +--- /dev/null ++++ b/test/Makemodule.am +@@ -0,0 +1,27 @@ ++XFAIL_TESTS = \ ++ test/nfs/nfsacl.test \ ++ test/nfs/nfs-dir.test ++TESTS = \ ++ test/cp.test \ ++ test/getfacl-noacl.test \ ++ test/getfacl-recursive.test \ ++ test/malformed-restore.test \ ++ test/misc.test \ ++ test/sbits-restore.test \ ++ test/setfacl-X.test \ ++ test/utf8-filenames.test \ ++ test/root/getfacl.test \ ++ test/root/permissions.test \ ++ test/root/restore.test \ ++ test/root/setfacl.test \ ++ $(XFAIL_TESTS) ++ ++EXTRA_DIST += \ ++ test/make-tree \ ++ test/malformed-restore-double-owner.acl \ ++ test/run \ ++ test/sort-getfacl-output \ ++ $(TESTS) ++ ++AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH"; ++TEST_LOG_COMPILER = $(srcdir)/test/run +diff --git a/test/root/getfacl.test b/test/root/getfacl.test +index f84e25d..649ebae 100644 +--- a/test/root/getfacl.test ++++ b/test/root/getfacl.test +@@ -1,6 +1,10 @@ + Make sure that getfacl always adds at least one space between the permissions + in an acl entry and the effective permissions comment. + ++Cry immediately if we are not running as root. ++ ++ $ require_root ++ + $ umask 022 + $ mkdir d + $ groupadd loooooooooooooooooooooooonggroup +diff --git a/test/root/permissions.test b/test/root/permissions.test +index afaf5f0..9b9e3de 100644 +--- a/test/root/permissions.test ++++ b/test/root/permissions.test +@@ -9,8 +9,7 @@ listed in parentheses. + + Cry immediately if we are not running as root. + +- $ id -u +- > 0 ++ $ require_root + + + First, set up a temporary directory and create a regular file with +diff --git a/test/root/restore.test b/test/root/restore.test +index 6003cd4..63a9d01 100644 +--- a/test/root/restore.test ++++ b/test/root/restore.test +@@ -1,6 +1,10 @@ + Ensure setuid bit is restored when the owner changes + https://bugzilla.redhat.com/show_bug.cgi?id=467936#c7 + ++Cry immediately if we are not running as root. ++ ++ $ require_root ++ + $ touch passwd + $ chmod 755 passwd + $ chmod u+s passwd +diff --git a/test/root/setfacl.test b/test/root/setfacl.test +index 630e9fb..a46a9f4 100644 +--- a/test/root/setfacl.test ++++ b/test/root/setfacl.test +@@ -1,5 +1,9 @@ + Setfacl utility tests. Run these tests on a filesystem with ACL support. + ++Cry immediately if we are not running as root. ++ ++ $ require_root ++ + $ mkdir d + $ chown bin:bin d + $ cd d +diff --git a/test/run b/test/run +index 0a12be6..fcbcf29 100755 +--- a/test/run ++++ b/test/run +@@ -268,6 +268,14 @@ sub exec_test($$) { + return su($prog->[1]); + } elsif ($prog->[0] eq "sg") { + return sg($prog->[1]); ++ } elsif ($prog->[0] eq "require_root") { ++ my $ret = su("root"); ++ if ($! != 0) { ++ print $ret->[0]; ++ warn "required root failed; skipping test"; ++ exit 77; ++ } ++ return []; + } elsif ($prog->[0] eq "export") { + my ($name, $value) = split /=/, $prog->[1]; + # FIXME: need to evaluate $value, so that things like this will work: +diff --git a/tools/Makemodule.am b/tools/Makemodule.am +new file mode 100644 +index 0000000..60a9a2d +--- /dev/null ++++ b/tools/Makemodule.am +@@ -0,0 +1,23 @@ ++tools_ldadd = $(LDADD) libacl.la libmisc.la ++ ++bin_PROGRAMS += chacl ++chacl_SOURCES = tools/chacl.c ++chacl_LDADD = $(tools_ldadd) ++ ++bin_PROGRAMS += getfacl ++getfacl_SOURCES = \ ++ tools/getfacl.c \ ++ tools/user_group.c \ ++ tools/user_group.h ++getfacl_LDADD = $(tools_ldadd) ++ ++bin_PROGRAMS += setfacl ++setfacl_SOURCES = \ ++ tools/do_set.c \ ++ tools/do_set.h \ ++ tools/parse.c \ ++ tools/parse.h \ ++ tools/sequence.c \ ++ tools/sequence.h \ ++ tools/setfacl.c ++setfacl_LDADD = $(tools_ldadd) +diff --git a/tools/chacl.c b/tools/chacl.c +new file mode 100644 +index 0000000..525a7ff +--- /dev/null ++++ b/tools/chacl.c +@@ -0,0 +1,354 @@ ++/* ++ * Copyright (c) 2001-2002 Silicon Graphics, Inc. ++ * All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it would be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#include "config.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "misc.h" ++ ++static int acl_delete_file (const char * path, acl_type_t type); ++static int list_acl(char *file); ++static int set_acl(acl_t acl, acl_t dacl, const char *fname); ++static int walk_dir(acl_t acl, acl_t dacl, const char *fname); ++ ++static char *program; ++static int rflag; ++ ++static void ++usage(void) ++{ ++ fprintf(stderr, _("Usage:\n")); ++ fprintf(stderr, _("\t%s acl pathname...\n"), program); ++ fprintf(stderr, _("\t%s -b acl dacl pathname...\n"), program); ++ fprintf(stderr, _("\t%s -d dacl pathname...\n"), program); ++ fprintf(stderr, _("\t%s -R pathname...\n"), program); ++ fprintf(stderr, _("\t%s -D pathname...\n"), program); ++ fprintf(stderr, _("\t%s -B pathname...\n"), program); ++ fprintf(stderr, _("\t%s -l pathname...\t[not IRIX compatible]\n"), ++ program); ++ fprintf(stderr, _("\t%s -r pathname...\t[not IRIX compatible]\n"), ++ program); ++ exit(1); ++} ++ ++int ++main(int argc, char *argv[]) ++{ ++ char *file; ++ int switch_flag = 0; /* ensure only one switch is used */ ++ int args_required = 2; ++ int failed = 0; /* exit status */ ++ int c; /* For use by getopt(3) */ ++ int dflag = 0; /* a Default ACL is desired */ ++ int bflag = 0; /* a both ACLs are desired */ ++ int Rflag = 0; /* set to true to remove an acl */ ++ int Dflag = 0; /* set to true to remove default acls */ ++ int Bflag = 0; /* set to true to remove both acls */ ++ int lflag = 0; /* set to true to list acls */ ++ acl_t acl = NULL; /* File ACL */ ++ acl_t dacl = NULL; /* Directory Default ACL */ ++ ++ program = basename(argv[0]); ++ ++ setlocale(LC_CTYPE, ""); ++ setlocale(LC_MESSAGES, ""); ++ bindtextdomain(PACKAGE, LOCALEDIR); ++ textdomain(PACKAGE); ++ ++ /* parse arguments */ ++ while ((c = getopt(argc, argv, "bdlRDBr")) != -1) { ++ if (switch_flag) ++ usage(); ++ switch_flag = 1; ++ ++ switch (c) { ++ case 'b': ++ bflag = 1; ++ args_required = 3; ++ break; ++ case 'd': ++ dflag = 1; ++ args_required = 2; ++ break; ++ case 'R': ++ Rflag = 1; ++ args_required = 1; ++ break; ++ case 'D': ++ Dflag = 1; ++ args_required = 1; ++ break; ++ case 'B': ++ Bflag = 1; ++ args_required = 1; ++ break; ++ case 'l': ++ lflag = 1; ++ args_required = 1; ++ break; ++ case 'r': ++ rflag = 1; ++ args_required = 1; ++ break; ++ default: ++ usage(); ++ break; ++ } ++ } ++ ++ /* if not enough arguments quit */ ++ if ((argc - optind) < args_required) ++ usage(); ++ ++ /* list the acls */ ++ if (lflag) { ++ for (; optind < argc; optind++) { ++ file = argv[optind]; ++ if (!list_acl(file)) ++ failed++; ++ } ++ return(failed); ++ } ++ ++ /* remove the acls */ ++ if (Rflag || Dflag || Bflag) { ++ for (; optind < argc; optind++) { ++ file = argv[optind]; ++ if (!Dflag && ++ (acl_delete_file(file, ACL_TYPE_ACCESS) == -1)) { ++ fprintf(stderr, _( ++ "%s: error removing access acl on \"%s\": %s\n"), ++ program, file, strerror(errno)); ++ failed++; ++ } ++ if (!Rflag && ++ (acl_delete_file(file, ACL_TYPE_DEFAULT) == -1)) { ++ fprintf(stderr, _( ++ "%s: error removing default acl on \"%s\": %s\n"), ++ program, file, strerror(errno)); ++ failed++; ++ } ++ } ++ return(failed); ++ } ++ ++ /* file access acl */ ++ if (! dflag) { ++ acl = acl_from_text(argv[optind]); ++ failed = acl_check(acl, &c); ++ if (failed < 0) { ++ fprintf(stderr, "%s: %s - %s\n", ++ program, argv[optind], strerror(errno)); ++ return 1; ++ } ++ else if (failed > 0) { ++ fprintf(stderr, _( ++ "%s: access ACL '%s': %s at entry %d\n"), ++ program, argv[optind], acl_error(failed), c); ++ return 1; ++ } ++ optind++; ++ } ++ ++ ++ /* directory default acl */ ++ if (bflag || dflag) { ++ dacl = acl_from_text(argv[optind]); ++ failed = acl_check(dacl, &c); ++ if (failed < 0) { ++ fprintf(stderr, "%s: %s - %s\n", ++ program, argv[optind], strerror(errno)); ++ return 1; ++ } ++ else if (failed > 0) { ++ fprintf(stderr, _( ++ "%s: access ACL '%s': %s at entry %d\n"), ++ program, argv[optind], acl_error(failed), c); ++ return 1; ++ } ++ optind++; ++ } ++ ++ /* place acls on files */ ++ for (; optind < argc; optind++) ++ failed += set_acl(acl, dacl, argv[optind]); ++ ++ if (acl) ++ acl_free(acl); ++ if (dacl) ++ acl_free(dacl); ++ ++ return(failed); ++} ++ ++/* ++ * deletes an access acl or directory default acl if one exists ++ */ ++static int ++acl_delete_file(const char *path, acl_type_t type) ++{ ++ int error = 0; ++ ++ /* converts access ACL to a minimal ACL */ ++ if (type == ACL_TYPE_ACCESS) { ++ acl_t acl; ++ acl_entry_t entry; ++ acl_tag_t tag; ++ ++ acl = acl_get_file(path, ACL_TYPE_ACCESS); ++ if (!acl) ++ return -1; ++ error = acl_get_entry(acl, ACL_FIRST_ENTRY, &entry); ++ while (error == 1) { ++ acl_get_tag_type(entry, &tag); ++ switch(tag) { ++ case ACL_USER: ++ case ACL_GROUP: ++ case ACL_MASK: ++ acl_delete_entry(acl, entry); ++ break; ++ } ++ error = acl_get_entry(acl, ACL_NEXT_ENTRY, &entry); ++ } ++ if (!error) ++ error = acl_set_file(path, ACL_TYPE_ACCESS, acl); ++ } else ++ error = acl_delete_def_file(path); ++ return(error); ++} ++ ++/* ++ * lists the acl for a file/dir in short text form ++ * return 0 on failure ++ * return 1 on success ++ */ ++static int ++list_acl(char *file) ++{ ++ acl_t acl = NULL; ++ acl_t dacl = NULL; ++ char *acl_text, *dacl_text = NULL; ++ ++ if ((acl = acl_get_file(file, ACL_TYPE_ACCESS)) == NULL) { ++ fprintf(stderr, _("%s: cannot get access ACL on '%s': %s\n"), ++ program, file, strerror(errno)); ++ return 0; ++ } ++ if ((dacl = acl_get_file(file, ACL_TYPE_DEFAULT)) == NULL && ++ (errno != EACCES)) { /* EACCES given if not a directory */ ++ fprintf(stderr, _("%s: cannot get default ACL on '%s': %s\n"), ++ program, file, strerror(errno)); ++ return 0; ++ } ++ acl_text = acl_to_any_text(acl, NULL, ',', TEXT_ABBREVIATE); ++ if (acl_text == NULL) { ++ fprintf(stderr, _("%s: cannot get access ACL text on " ++ "'%s': %s\n"), program, file, strerror(errno)); ++ return 0; ++ } ++ if (acl_entries(dacl) > 0) { ++ dacl_text = acl_to_any_text(dacl, NULL, ',', TEXT_ABBREVIATE); ++ if (dacl_text == NULL) { ++ fprintf(stderr, _("%s: cannot get default ACL text on " ++ "'%s': %s\n"), program, file, strerror(errno)); ++ return 0; ++ } ++ } ++ if (dacl_text) { ++ printf("%s [%s/%s]\n", file, acl_text, dacl_text); ++ acl_free(dacl_text); ++ } else ++ printf("%s [%s]\n", file, acl_text); ++ acl_free(acl_text); ++ acl_free(acl); ++ acl_free(dacl); ++ return 1; ++} ++ ++static int ++set_acl(acl_t acl, acl_t dacl, const char *fname) ++{ ++ int failed = 0; ++ ++ if (rflag) ++ failed += walk_dir(acl, dacl, fname); ++ ++ /* set regular acl */ ++ if (acl && acl_set_file(fname, ACL_TYPE_ACCESS, acl) == -1) { ++ fprintf(stderr, _("%s: cannot set access acl on \"%s\": %s\n"), ++ program, fname, strerror(errno)); ++ failed++; ++ } ++ /* set default acl */ ++ if (dacl && acl_set_file(fname, ACL_TYPE_DEFAULT, dacl) == -1) { ++ fprintf(stderr, _("%s: cannot set default acl on \"%s\": %s\n"), ++ program, fname, strerror(errno)); ++ failed++; ++ } ++ ++ return(failed); ++} ++ ++static int ++walk_dir(acl_t acl, acl_t dacl, const char *fname) ++{ ++ int failed = 0; ++ DIR *dir; ++ struct dirent64 *d; ++ char *name; ++ ++ if ((dir = opendir(fname)) == NULL) { ++ if (errno != ENOTDIR) { ++ fprintf(stderr, _("%s: opendir failed: %s\n"), ++ program, strerror(errno)); ++ return(1); ++ } ++ return(0); /* got a file, not an error */ ++ } ++ ++ while ((d = readdir64(dir)) != NULL) { ++ /* skip "." and ".." entries */ ++ if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0) ++ continue; ++ ++ name = malloc(strlen(fname) + strlen(d->d_name) + 2); ++ if (name == NULL) { ++ fprintf(stderr, _("%s: malloc failed: %s\n"), ++ program, strerror(errno)); ++ exit(1); ++ } ++ sprintf(name, "%s/%s", fname, d->d_name); ++ ++ failed += set_acl(acl, dacl, name); ++ free(name); ++ } ++ closedir(dir); ++ ++ return(failed); ++} +diff --git a/tools/do_set.c b/tools/do_set.c +new file mode 100644 +index 0000000..60da837 +--- /dev/null ++++ b/tools/do_set.c +@@ -0,0 +1,528 @@ ++/* ++ File: do_set.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999, 2000 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#include "config.h" ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "misc.h" ++#include "sequence.h" ++#include "do_set.h" ++#include "parse.h" ++#include "walk_tree.h" ++ ++ ++extern const char *progname; ++extern int opt_recalculate; ++extern int opt_test; ++extern int print_options; ++ ++acl_entry_t ++find_entry( ++ acl_t acl, ++ acl_tag_t type, ++ id_t id) ++{ ++ acl_entry_t ent; ++ acl_tag_t e_type; ++ id_t *e_id_p; ++ ++ if (acl_get_entry(acl, ACL_FIRST_ENTRY, &ent) != 1) ++ return NULL; ++ ++ for(;;) { ++ acl_get_tag_type(ent, &e_type); ++ if (type == e_type) { ++ if (id != ACL_UNDEFINED_ID) { ++ e_id_p = acl_get_qualifier(ent); ++ if (e_id_p == NULL) ++ return NULL; ++ if (*e_id_p == id) { ++ acl_free(e_id_p); ++ return ent; ++ } ++ acl_free(e_id_p); ++ } else { ++ return ent; ++ } ++ } ++ if (acl_get_entry(acl, ACL_NEXT_ENTRY, &ent) != 1) ++ return NULL; ++ } ++} ++ ++int ++has_execute_perms( ++ acl_t acl) ++{ ++ acl_entry_t ent; ++ ++ if (acl_get_entry(acl, ACL_FIRST_ENTRY, &ent) != 1) ++ return 0; ++ ++ for(;;) { ++ acl_permset_t permset; ++ ++ acl_get_permset(ent, &permset); ++ if (acl_get_perm(permset, ACL_EXECUTE) != 0) ++ return 1; ++ ++ if (acl_get_entry(acl, ACL_NEXT_ENTRY, &ent) != 1) ++ return 0; ++ } ++} ++ ++int ++clone_entry( ++ acl_t from_acl, ++ acl_tag_t from_type, ++ acl_t *to_acl, ++ acl_tag_t to_type) ++{ ++ acl_entry_t from_entry, to_entry; ++ from_entry = find_entry(from_acl, from_type, ACL_UNDEFINED_ID); ++ if (from_entry) { ++ if (acl_create_entry(to_acl, &to_entry) != 0) ++ return -1; ++ acl_copy_entry(to_entry, from_entry); ++ acl_set_tag_type(to_entry, to_type); ++ return 0; ++ } else { ++ return 1; ++ } ++} ++ ++ ++void ++print_test( ++ FILE *file, ++ const char *path_p, ++ const struct stat *st, ++ const acl_t acl, ++ const acl_t default_acl) ++{ ++ char *acl_text, *default_acl_text; ++ ++ acl_text = acl_to_any_text(acl, NULL, ',', TEXT_ABBREVIATE); ++ default_acl_text = ++ acl_to_any_text(default_acl, "d:", ',', TEXT_ABBREVIATE); ++ fprintf(file, "%s: %s,%s\n", path_p, ++ acl_text ? acl_text : "*", ++ default_acl_text ? default_acl_text : "*"); ++ acl_free(acl_text); ++ acl_free(default_acl_text); ++} ++ ++ ++static void ++set_perm( ++ acl_entry_t ent, ++ mode_t perm) ++{ ++ acl_permset_t set; ++ ++ acl_get_permset(ent, &set); ++ if (perm & CMD_PERM_READ) ++ acl_add_perm(set, ACL_READ); ++ else ++ acl_delete_perm(set, ACL_READ); ++ if (perm & CMD_PERM_WRITE) ++ acl_add_perm(set, ACL_WRITE); ++ else ++ acl_delete_perm(set, ACL_WRITE); ++ if (perm & CMD_PERM_EXECUTE) ++ acl_add_perm(set, ACL_EXECUTE); ++ else ++ acl_delete_perm(set, ACL_EXECUTE); ++} ++ ++ ++static int ++retrieve_acl( ++ const char *path_p, ++ acl_type_t type, ++ const struct stat *st, ++ acl_t *old_acl, ++ acl_t *acl) ++{ ++ if (*acl) ++ return 0; ++ *acl = NULL; ++ if (type == ACL_TYPE_ACCESS || S_ISDIR(st->st_mode)) { ++ *old_acl = acl_get_file(path_p, type); ++ if (*old_acl == NULL && (errno == ENOSYS || errno == ENOTSUP)) { ++ if (type == ACL_TYPE_DEFAULT) ++ *old_acl = acl_init(0); ++ else ++ *old_acl = acl_from_mode(st->st_mode); ++ } ++ } else ++ *old_acl = acl_init(0); ++ if (*old_acl == NULL) ++ return -1; ++ *acl = acl_dup(*old_acl); ++ if (*acl == NULL) ++ return -1; ++ return 0; ++} ++ ++ ++static int ++remove_extended_entries( ++ acl_t acl) ++{ ++ acl_entry_t ent, group_obj; ++ acl_permset_t mask_permset, group_obj_permset; ++ acl_tag_t tag; ++ int error; ++ ++ /* ++ * Removing the ACL_MASK entry from the ACL results in ++ * increased permissions for the owning group if the ++ * ACL_GROUP_OBJ entry contains permissions not contained ++ * in the ACL_MASK entry. We remove these permissions from ++ * the ACL_GROUP_OBJ entry to avoid that. ++ * ++ * After removing the ACL, the file owner and the owning group ++ * therefore have the same permissions as before. ++ */ ++ ++ ent = find_entry(acl, ACL_MASK, ACL_UNDEFINED_ID); ++ group_obj = find_entry(acl, ACL_GROUP_OBJ, ACL_UNDEFINED_ID); ++ if (ent && group_obj) { ++ if (!acl_get_permset(ent, &mask_permset) && ++ !acl_get_permset(group_obj, &group_obj_permset)) { ++ if (!acl_get_perm(mask_permset, ACL_READ)) ++ acl_delete_perm(group_obj_permset, ACL_READ); ++ if (!acl_get_perm(mask_permset, ACL_WRITE)) ++ acl_delete_perm(group_obj_permset, ACL_WRITE); ++ if (!acl_get_perm(mask_permset, ACL_EXECUTE)) ++ acl_delete_perm(group_obj_permset, ACL_EXECUTE); ++ } ++ } ++ ++ error = acl_get_entry(acl, ACL_FIRST_ENTRY, &ent); ++ while (error == 1) { ++ acl_get_tag_type(ent, &tag); ++ switch(tag) { ++ case ACL_USER: ++ case ACL_GROUP: ++ case ACL_MASK: ++ acl_delete_entry(acl, ent); ++ break; ++ default: ++ break; ++ } ++ ++ error = acl_get_entry(acl, ACL_NEXT_ENTRY, &ent); ++ } ++ if (error < 0) ++ return -1; ++ return 0; ++} ++ ++ ++#define RETRIEVE_ACL(type) do { \ ++ error = retrieve_acl(path_p, type, st, old_xacl, xacl); \ ++ if (error) \ ++ goto fail; \ ++ } while(0) ++ ++int ++do_set( ++ const char *path_p, ++ const struct stat *st, ++ int walk_flags, ++ void *arg) ++{ ++ struct do_set_args *args = arg; ++ acl_t old_acl = NULL, old_default_acl = NULL; ++ acl_t acl = NULL, default_acl = NULL; ++ acl_t *xacl, *old_xacl; ++ acl_entry_t ent; ++ cmd_t cmd; ++ int which_entry; ++ int errors = 0, error; ++ char *acl_text; ++ int acl_modified = 0, default_acl_modified = 0; ++ int acl_mask_provided = 0, default_acl_mask_provided = 0; ++ ++ if (walk_flags & WALK_TREE_FAILED) { ++ fprintf(stderr, "%s: %s: %s\n", progname, path_p, strerror(errno)); ++ return 1; ++ } ++ ++ /* ++ * Symlinks can never have ACLs, so when doing a physical walk, we ++ * skip symlinks altogether, and when doing a half-logical walk, we ++ * skip all non-toplevel symlinks. ++ */ ++ if ((walk_flags & WALK_TREE_SYMLINK) && ++ ((walk_flags & WALK_TREE_PHYSICAL) || ++ !(walk_flags & (WALK_TREE_TOPLEVEL | WALK_TREE_LOGICAL)))) ++ return 0; ++ ++ /* Execute the commands in seq (read ACLs on demand) */ ++ error = seq_get_cmd(args->seq, SEQ_FIRST_CMD, &cmd); ++ if (error == 0) ++ return 0; ++ while (error == 1) { ++ mode_t perm = cmd->c_perm; ++ ++ if (cmd->c_type == ACL_TYPE_ACCESS) { ++ xacl = &acl; ++ old_xacl = &old_acl; ++ acl_modified = 1; ++ if (cmd->c_tag == ACL_MASK) ++ acl_mask_provided = 1; ++ } else { ++ xacl = &default_acl; ++ old_xacl = &old_default_acl; ++ default_acl_modified = 1; ++ if (cmd->c_tag == ACL_MASK) ++ default_acl_mask_provided = 1; ++ } ++ ++ RETRIEVE_ACL(cmd->c_type); ++ ++ /* Check for `X', and replace with `x' as appropriate. */ ++ if (perm & CMD_PERM_COND_EXECUTE) { ++ perm &= ~CMD_PERM_COND_EXECUTE; ++ if (S_ISDIR(st->st_mode) || has_execute_perms(*xacl)) ++ perm |= CMD_PERM_EXECUTE; ++ } ++ ++ switch(cmd->c_cmd) { ++ case CMD_ENTRY_REPLACE: ++ ent = find_entry(*xacl, cmd->c_tag, cmd->c_id); ++ if (!ent) { ++ if (acl_create_entry(xacl, &ent) != 0) ++ goto fail; ++ acl_set_tag_type(ent, cmd->c_tag); ++ if (cmd->c_id != ACL_UNDEFINED_ID) ++ acl_set_qualifier(ent, ++ &cmd->c_id); ++ } ++ set_perm(ent, perm); ++ break; ++ ++ case CMD_REMOVE_ENTRY: ++ ent = find_entry(*xacl, cmd->c_tag, cmd->c_id); ++ if (ent) ++ acl_delete_entry(*xacl, ent); ++ else ++ /* ignore */; ++ break; ++ ++ case CMD_REMOVE_EXTENDED_ACL: ++ remove_extended_entries(acl); ++ break; ++ ++ case CMD_REMOVE_ACL: ++ acl_free(*xacl); ++ *xacl = acl_init(5); ++ if (!*xacl) ++ goto fail; ++ break; ++ ++ default: ++ errno = EINVAL; ++ goto fail; ++ } ++ ++ error = seq_get_cmd(args->seq, SEQ_NEXT_CMD, &cmd); ++ } ++ ++ if (error < 0) ++ goto fail; ++ ++ /* Try to fill in missing entries */ ++ if (default_acl && acl_entries(default_acl) != 0) { ++ xacl = &acl; ++ old_xacl = &old_acl; ++ ++ if (!find_entry(default_acl, ACL_USER_OBJ, ACL_UNDEFINED_ID)) { ++ if (!acl) ++ RETRIEVE_ACL(ACL_TYPE_ACCESS); ++ clone_entry(acl, ACL_USER_OBJ, ++ &default_acl, ACL_USER_OBJ); ++ } ++ if (!find_entry(default_acl, ACL_GROUP_OBJ, ACL_UNDEFINED_ID)) { ++ if (!acl) ++ RETRIEVE_ACL(ACL_TYPE_ACCESS); ++ clone_entry(acl, ACL_GROUP_OBJ, ++ &default_acl, ACL_GROUP_OBJ); ++ } ++ if (!find_entry(default_acl, ACL_OTHER, ACL_UNDEFINED_ID)) { ++ if (!acl) ++ RETRIEVE_ACL(ACL_TYPE_ACCESS); ++ clone_entry(acl, ACL_OTHER, ++ &default_acl, ACL_OTHER); ++ } ++ } ++ ++ /* update mask entries and check if ACLs are valid */ ++ if (acl && acl_modified) { ++ if (acl_equiv_mode(acl, NULL) != 0) { ++ if (!acl_mask_provided && ++ !find_entry(acl, ACL_MASK, ACL_UNDEFINED_ID)) ++ clone_entry(acl, ACL_GROUP_OBJ, ++ &acl, ACL_MASK); ++ if (opt_recalculate != -1 && ++ (!acl_mask_provided || opt_recalculate == 1)) ++ acl_calc_mask(&acl); ++ } ++ ++ error = acl_check(acl, &which_entry); ++ if (error < 0) ++ goto fail; ++ if (error > 0) { ++ acl_text = acl_to_any_text(acl, NULL, ',', 0); ++ fprintf(stderr, _("%s: %s: Malformed access ACL " ++ "`%s': %s at entry %d\n"), progname, path_p, ++ acl_text, acl_error(error), which_entry+1); ++ acl_free(acl_text); ++ errors++; ++ goto cleanup; ++ } ++ } ++ ++ if (default_acl && acl_entries(default_acl) != 0 && ++ default_acl_modified) { ++ if (acl_equiv_mode(default_acl, NULL) != 0) { ++ if (!default_acl_mask_provided && ++ !find_entry(default_acl,ACL_MASK,ACL_UNDEFINED_ID)) ++ clone_entry(default_acl, ACL_GROUP_OBJ, ++ &default_acl, ACL_MASK); ++ if (opt_recalculate != -1 && ++ (!default_acl_mask_provided || ++ opt_recalculate == 1)) ++ acl_calc_mask(&default_acl); ++ } ++ ++ error = acl_check(default_acl, &which_entry); ++ if (error < 0) ++ goto fail; ++ if (error > 0) { ++ acl_text = acl_to_any_text(default_acl, NULL, ',', 0); ++ fprintf(stderr, _("%s: %s: Malformed default ACL " ++ "`%s': %s at entry %d\n"), ++ progname, path_p, acl_text, ++ acl_error(error), which_entry+1); ++ acl_free(acl_text); ++ errors++; ++ goto cleanup; ++ } ++ } ++ ++ /* Only directores can have default ACLs */ ++ if (default_acl && !S_ISDIR(st->st_mode) && (walk_flags & WALK_TREE_RECURSIVE)) { ++ /* In recursive mode, ignore default ACLs for files */ ++ acl_free(default_acl); ++ default_acl = NULL; ++ } ++ ++ /* check which ACLs have changed */ ++ if (acl && old_acl && acl_cmp(old_acl, acl) == 0) { ++ acl_free(acl); ++ acl = NULL; ++ } ++ if ((default_acl && old_default_acl && ++ acl_cmp(old_default_acl, default_acl) == 0)) { ++ acl_free(default_acl); ++ default_acl = NULL; ++ } ++ ++ /* update the file system */ ++ if (opt_test) { ++ print_test(stdout, path_p, st, ++ acl, default_acl); ++ goto cleanup; ++ } ++ if (acl) { ++ int equiv_mode; ++ mode_t mode = 0; ++ ++ equiv_mode = acl_equiv_mode(acl, &mode); ++ ++ if (acl_set_file(path_p, ACL_TYPE_ACCESS, acl) != 0) { ++ if (errno == ENOSYS || errno == ENOTSUP) { ++ if (equiv_mode != 0) ++ goto fail; ++ else if (chmod(path_p, mode) != 0) ++ goto fail; ++ } else ++ goto fail; ++ } ++ args->mode = mode; ++ } ++ if (default_acl) { ++ if (S_ISDIR(st->st_mode)) { ++ if (acl_entries(default_acl) == 0) { ++ if (acl_delete_def_file(path_p) != 0 && ++ errno != ENOSYS && errno != ENOTSUP) ++ goto fail; ++ } else { ++ if (acl_set_file(path_p, ACL_TYPE_DEFAULT, ++ default_acl) != 0) ++ goto fail; ++ } ++ } else { ++ if (acl_entries(default_acl) != 0) { ++ fprintf(stderr, _("%s: %s: Only directories " ++ "can have default ACLs\n"), ++ progname, path_p); ++ errors++; ++ goto cleanup; ++ } ++ } ++ } ++ ++ error = 0; ++ ++cleanup: ++ if (acl) ++ acl_free(acl); ++ if (old_acl) ++ acl_free(old_acl); ++ if (default_acl) ++ acl_free(default_acl); ++ if (old_default_acl) ++ acl_free(old_default_acl); ++ return errors; ++ ++fail: ++ fprintf(stderr, "%s: %s: %s\n", progname, path_p, strerror(errno)); ++ errors++; ++ goto cleanup; ++} ++ +diff --git a/tools/do_set.h b/tools/do_set.h +new file mode 100644 +index 0000000..2ea25a8 +--- /dev/null ++++ b/tools/do_set.h +@@ -0,0 +1,36 @@ ++/* ++ File: do_set.h ++ (Linux Access Control List Management) ++ ++ Copyright (C) 2009 by Andreas Gruenbacher ++ ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __DO_SET_H ++#define __DO_SET_H ++ ++#include "sequence.h" ++ ++struct do_set_args { ++ seq_t seq; ++ mode_t mode; ++}; ++ ++extern int do_set(const char *path_p, const struct stat *stat_p, int flags, ++ void *arg); ++ ++#endif /* __DO_SET_H */ +diff --git a/tools/getfacl.c b/tools/getfacl.c +new file mode 100644 +index 0000000..22cc1c7 +--- /dev/null ++++ b/tools/getfacl.c +@@ -0,0 +1,747 @@ ++/* ++ File: getfacl.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999-2002 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ USA. ++*/ ++ ++#include "config.h" ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "misc.h" ++#include "user_group.h" ++#include "walk_tree.h" ++ ++#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT" ++ ++#if !POSIXLY_CORRECT ++# define CMD_LINE_OPTIONS "aceEsRLPtpndvh" ++#endif ++#define POSIXLY_CMD_LINE_OPTIONS "d" ++ ++struct option long_options[] = { ++#if !POSIXLY_CORRECT ++ { "access", 0, 0, 'a' }, ++ { "omit-header", 0, 0, 'c' }, ++ { "all-effective", 0, 0, 'e' }, ++ { "no-effective", 0, 0, 'E' }, ++ { "skip-base", 0, 0, 's' }, ++ { "recursive", 0, 0, 'R' }, ++ { "logical", 0, 0, 'L' }, ++ { "physical", 0, 0, 'P' }, ++ { "tabular", 0, 0, 't' }, ++ { "absolute-names", 0, 0, 'p' }, ++ { "numeric", 0, 0, 'n' }, ++#endif ++ { "default", 0, 0, 'd' }, ++ { "version", 0, 0, 'v' }, ++ { "help", 0, 0, 'h' }, ++ { NULL, 0, 0, 0 } ++}; ++ ++const char *progname; ++const char *cmd_line_options; ++ ++int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL; ++int opt_print_acl; ++int opt_print_default_acl; ++int opt_strip_leading_slash = 1; ++int opt_comments = 1; /* include comments */ ++int opt_skip_base; /* skip files that only have the base entries */ ++int opt_tabular; /* tabular output format (alias `showacl') */ ++#if POSIXLY_CORRECT ++const int posixly_correct = 1; /* Posix compatible behavior! */ ++#else ++int posixly_correct; /* Posix compatible behavior? */ ++#endif ++int had_errors; ++int absolute_warning; /* Absolute path warning was issued */ ++int print_options = TEXT_SOME_EFFECTIVE; ++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); ++ if (q == NULL) { ++ fprintf(stderr, "%s: %s\n", progname, strerror(errno)); ++ exit(1); ++ } ++ return q; ++} ++ ++struct name_list { ++ struct name_list *next; ++ char name[0]; ++}; ++ ++void free_list(struct name_list *names) ++{ ++ struct name_list *next; ++ ++ while (names) { ++ next = names->next; ++ free(names); ++ names = next; ++ } ++} ++ ++struct name_list *get_list(const struct stat *st, acl_t acl) ++{ ++ struct name_list *first = NULL, *last = NULL; ++ acl_entry_t ent; ++ int ret = 0; ++ ++ if (acl != NULL) ++ ret = acl_get_entry(acl, ACL_FIRST_ENTRY, &ent); ++ if (ret != 1) ++ return NULL; ++ while (ret > 0) { ++ acl_tag_t e_type; ++ const id_t *id_p; ++ const char *name = ""; ++ int len; ++ ++ acl_get_tag_type(ent, &e_type); ++ switch(e_type) { ++ case ACL_USER_OBJ: ++ name = user_name(st->st_uid, opt_numeric); ++ break; ++ ++ case ACL_USER: ++ id_p = acl_get_qualifier(ent); ++ if (id_p != NULL) ++ name = user_name(*id_p, opt_numeric); ++ break; ++ ++ case ACL_GROUP_OBJ: ++ name = group_name(st->st_gid, opt_numeric); ++ break; ++ ++ case ACL_GROUP: ++ id_p = acl_get_qualifier(ent); ++ if (id_p != NULL) ++ name = group_name(*id_p, opt_numeric); ++ break; ++ } ++ name = xquote(name, "\t\n\r"); ++ len = strlen(name); ++ if (last == NULL) { ++ first = last = (struct name_list *) ++ malloc(sizeof(struct name_list) + len + 1); ++ } else { ++ last->next = (struct name_list *) ++ malloc(sizeof(struct name_list) + len + 1); ++ last = last->next; ++ } ++ if (last == NULL) { ++ free_list(first); ++ return NULL; ++ } ++ last->next = NULL; ++ strcpy(last->name, name); ++ ++ ret = acl_get_entry(acl, ACL_NEXT_ENTRY, &ent); ++ } ++ return first; ++} ++ ++int max_name_length(struct name_list *names) ++{ ++ int max_len = 0; ++ while (names != NULL) { ++ struct name_list *next = names->next; ++ int len = strlen(names->name); ++ ++ if (len > max_len) ++ max_len = len; ++ names = next; ++ } ++ return max_len; ++} ++ ++int names_width; ++ ++struct acl_perm_def { ++ acl_tag_t tag; ++ char c; ++}; ++ ++struct acl_perm_def acl_perm_defs[] = { ++ { ACL_READ, 'r' }, ++ { ACL_WRITE, 'w' }, ++ { ACL_EXECUTE, 'x' }, ++ { 0, 0 } ++}; ++ ++#define ACL_PERMS (sizeof(acl_perm_defs) / sizeof(struct acl_perm_def) - 1) ++ ++void acl_perm_str(acl_entry_t entry, char *str) ++{ ++ acl_permset_t permset; ++ int n; ++ ++ acl_get_permset(entry, &permset); ++ for (n = 0; n < (int) ACL_PERMS; n++) { ++ str[n] = (acl_get_perm(permset, acl_perm_defs[n].tag) ? ++ acl_perm_defs[n].c : '-'); ++ } ++ str[n] = '\0'; ++} ++ ++void acl_mask_perm_str(acl_t acl, char *str) ++{ ++ acl_entry_t entry; ++ ++ str[0] = '\0'; ++ if (acl_get_entry(acl, ACL_FIRST_ENTRY, &entry) != 1) ++ return; ++ for(;;) { ++ acl_tag_t tag; ++ ++ acl_get_tag_type(entry, &tag); ++ if (tag == ACL_MASK) { ++ acl_perm_str(entry, str); ++ return; ++ } ++ if (acl_get_entry(acl, ACL_NEXT_ENTRY, &entry) != 1) ++ return; ++ } ++} ++ ++void apply_mask(char *perm, const char *mask) ++{ ++ while (*perm) { ++ if (*mask == '-' && *perm >= 'a' && *perm <= 'z') ++ *perm = *perm - 'a' + 'A'; ++ perm++; ++ if (*mask) ++ mask++; ++ } ++} ++ ++int show_line(FILE *stream, struct name_list **acl_names, acl_t acl, ++ acl_entry_t *acl_ent, const char *acl_mask, ++ struct name_list **dacl_names, acl_t dacl, ++ acl_entry_t *dacl_ent, const char *dacl_mask) ++{ ++ acl_tag_t tag_type; ++ const char *tag, *name; ++ char acl_perm[ACL_PERMS+1], dacl_perm[ACL_PERMS+1]; ++ ++ if (acl) { ++ acl_get_tag_type(*acl_ent, &tag_type); ++ name = (*acl_names)->name; ++ } else { ++ acl_get_tag_type(*dacl_ent, &tag_type); ++ name = (*dacl_names)->name; ++ } ++ ++ switch(tag_type) { ++ case ACL_USER_OBJ: ++ tag = "USER"; ++ break; ++ case ACL_USER: ++ tag = "user"; ++ break; ++ case ACL_GROUP_OBJ: ++ tag = "GROUP"; ++ break; ++ case ACL_GROUP: ++ tag = "group"; ++ break; ++ case ACL_MASK: ++ tag = "mask"; ++ break; ++ case ACL_OTHER: ++ tag = "other"; ++ break; ++ default: ++ return -1; ++ } ++ ++ memset(acl_perm, ' ', ACL_PERMS); ++ acl_perm[ACL_PERMS] = '\0'; ++ if (acl_ent) { ++ acl_perm_str(*acl_ent, acl_perm); ++ if (tag_type != ACL_USER_OBJ && tag_type != ACL_OTHER && ++ tag_type != ACL_MASK) ++ apply_mask(acl_perm, acl_mask); ++ } ++ memset(dacl_perm, ' ', ACL_PERMS); ++ dacl_perm[ACL_PERMS] = '\0'; ++ if (dacl_ent) { ++ acl_perm_str(*dacl_ent, dacl_perm); ++ if (tag_type != ACL_USER_OBJ && tag_type != ACL_OTHER && ++ tag_type != ACL_MASK) ++ apply_mask(dacl_perm, dacl_mask); ++ } ++ ++ fprintf(stream, "%-5s %*s %*s %*s\n", ++ tag, -names_width, name, ++ -(int)ACL_PERMS, acl_perm, ++ -(int)ACL_PERMS, dacl_perm); ++ ++ if (acl_names) { ++ acl_get_entry(acl, ACL_NEXT_ENTRY, acl_ent); ++ (*acl_names) = (*acl_names)->next; ++ } ++ if (dacl_names) { ++ acl_get_entry(dacl, ACL_NEXT_ENTRY, dacl_ent); ++ (*dacl_names) = (*dacl_names)->next; ++ } ++ return 0; ++} ++ ++int do_show(FILE *stream, const char *path_p, const struct stat *st, ++ acl_t acl, acl_t dacl) ++{ ++ struct name_list *acl_names = get_list(st, acl), ++ *first_acl_name = acl_names; ++ struct name_list *dacl_names = get_list(st, dacl), ++ *first_dacl_name = dacl_names; ++ ++ int acl_names_width = max_name_length(acl_names); ++ int dacl_names_width = max_name_length(dacl_names); ++ acl_entry_t acl_ent; ++ acl_entry_t dacl_ent; ++ char acl_mask[ACL_PERMS+1], dacl_mask[ACL_PERMS+1]; ++ int ret; ++ ++ names_width = 8; ++ if (acl_names_width > names_width) ++ names_width = acl_names_width; ++ if (dacl_names_width > names_width) ++ names_width = dacl_names_width; ++ ++ acl_mask[0] = '\0'; ++ if (acl) { ++ acl_mask_perm_str(acl, acl_mask); ++ ret = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_ent); ++ if (ret == 0) ++ acl = NULL; ++ if (ret < 0) ++ return ret; ++ } ++ dacl_mask[0] = '\0'; ++ if (dacl) { ++ acl_mask_perm_str(dacl, dacl_mask); ++ ret = acl_get_entry(dacl, ACL_FIRST_ENTRY, &dacl_ent); ++ if (ret == 0) ++ dacl = NULL; ++ if (ret < 0) ++ return ret; ++ } ++ fprintf(stream, "# file: %s\n", xquote(path_p, "\n\r")); ++ while (acl_names != NULL || dacl_names != NULL) { ++ acl_tag_t acl_tag, dacl_tag; ++ ++ if (acl) ++ acl_get_tag_type(acl_ent, &acl_tag); ++ if (dacl) ++ acl_get_tag_type(dacl_ent, &dacl_tag); ++ ++ if (acl && (!dacl || acl_tag < dacl_tag)) { ++ show_line(stream, &acl_names, acl, &acl_ent, acl_mask, ++ NULL, NULL, NULL, NULL); ++ continue; ++ } else if (dacl && (!acl || dacl_tag < acl_tag)) { ++ show_line(stream, NULL, NULL, NULL, NULL, ++ &dacl_names, dacl, &dacl_ent, dacl_mask); ++ 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); ++ ++ if (acl && (!dacl || *acl_id_p < *dacl_id_p)) { ++ 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)) { ++ show_line(stream, NULL, NULL, NULL, ++ NULL, &dacl_names, dacl, ++ &dacl_ent, dacl_mask); ++ continue; ++ } ++ } ++ show_line(stream, &acl_names, acl, &acl_ent, acl_mask, ++ &dacl_names, dacl, &dacl_ent, dacl_mask); ++ } ++ } ++ ++ free_list(first_acl_name); ++ free_list(first_dacl_name); ++ ++ return 0; ++} ++ ++/* ++ * Create an ACL from the file permission bits ++ * of the file PATH_P. ++ */ ++static acl_t ++acl_get_file_mode(const char *path_p) ++{ ++ struct stat st; ++ ++ if (stat(path_p, &st) != 0) ++ return NULL; ++ return acl_from_mode(st.st_mode); ++} ++ ++static const char * ++flagstr(mode_t mode) ++{ ++ static char str[4]; ++ ++ str[0] = (mode & S_ISUID) ? 's' : '-'; ++ str[1] = (mode & S_ISGID) ? 's' : '-'; ++ str[2] = (mode & S_ISVTX) ? 't' : '-'; ++ str[3] = '\0'; ++ return str; ++} ++ ++int do_print(const char *path_p, const struct stat *st, int walk_flags, void *unused) ++{ ++ const char *default_prefix = NULL; ++ acl_t acl = NULL, default_acl = NULL; ++ int error = 0; ++ ++ if (walk_flags & WALK_TREE_FAILED) { ++ fprintf(stderr, "%s: %s: %s\n", progname, xquote(path_p, "\n\r"), ++ strerror(errno)); ++ return 1; ++ } ++ ++ /* ++ * Symlinks can never have ACLs, so when doing a physical walk, we ++ * skip symlinks altogether, and when doing a half-logical walk, we ++ * skip all non-toplevel symlinks. ++ */ ++ if ((walk_flags & WALK_TREE_SYMLINK) && ++ ((walk_flags & WALK_TREE_PHYSICAL) || ++ !(walk_flags & (WALK_TREE_TOPLEVEL | WALK_TREE_LOGICAL)))) ++ return 0; ++ ++ if (opt_print_acl) { ++ acl = acl_get_file(path_p, ACL_TYPE_ACCESS); ++ if (acl == NULL && (errno == ENOSYS || errno == ENOTSUP)) ++ acl = acl_get_file_mode(path_p); ++ if (acl == NULL) ++ goto fail; ++ } ++ ++ if (opt_print_default_acl && S_ISDIR(st->st_mode)) { ++ default_acl = acl_get_file(path_p, ACL_TYPE_DEFAULT); ++ if (default_acl == NULL) { ++ if (errno != ENOSYS && errno != ENOTSUP) ++ goto fail; ++ } else if (acl_entries(default_acl) == 0) { ++ acl_free(default_acl); ++ default_acl = NULL; ++ } ++ } ++ ++ if (opt_skip_base && ++ (!acl || acl_equiv_mode(acl, NULL) == 0) && !default_acl) ++ return 0; ++ ++ if (opt_print_acl && opt_print_default_acl) ++ default_prefix = "default:"; ++ ++ if (opt_strip_leading_slash) { ++ if (*path_p == '/') { ++ if (!absolute_warning) { ++ fprintf(stderr, _("%s: Removing leading " ++ "'/' from absolute path names\n"), ++ progname); ++ absolute_warning = 1; ++ } ++ while (*path_p == '/') ++ path_p++; ++ } else if (*path_p == '.' && *(path_p+1) == '/') ++ while (*++path_p == '/') ++ /* nothing */ ; ++ if (*path_p == '\0') ++ path_p = "."; ++ } ++ ++ if (opt_tabular) { ++ if (do_show(stdout, path_p, st, acl, default_acl) != 0) ++ goto fail; ++ } else { ++ if (opt_comments) { ++ printf("# file: %s\n", xquote(path_p, "\n\r")); ++ printf("# owner: %s\n", ++ xquote(user_name(st->st_uid, opt_numeric), " \t\n\r")); ++ printf("# group: %s\n", ++ xquote(group_name(st->st_gid, opt_numeric), " \t\n\r")); ++ if ((st->st_mode & (S_ISVTX | S_ISUID | S_ISGID)) && !posixly_correct) ++ printf("# flags: %s\n", flagstr(st->st_mode)); ++ } ++ if (acl != NULL) { ++ char *acl_text = acl_to_any_text(acl, NULL, '\n', ++ print_options); ++ if (!acl_text) ++ goto fail; ++ if (puts(acl_text) < 0) { ++ acl_free(acl_text); ++ goto fail; ++ } ++ acl_free(acl_text); ++ } ++ if (default_acl != NULL) { ++ char *acl_text = acl_to_any_text(default_acl, ++ default_prefix, '\n', ++ print_options); ++ if (!acl_text) ++ goto fail; ++ if (puts(acl_text) < 0) { ++ acl_free(acl_text); ++ goto fail; ++ } ++ acl_free(acl_text); ++ } ++ } ++ if (acl || default_acl || opt_comments) ++ printf("\n"); ++ ++cleanup: ++ if (acl) ++ acl_free(acl); ++ if (default_acl) ++ acl_free(default_acl); ++ return error; ++ ++fail: ++ fprintf(stderr, "%s: %s: %s\n", progname, xquote(path_p, "\n\r"), ++ strerror(errno)); ++ error = -1; ++ goto cleanup; ++} ++ ++ ++void help(void) ++{ ++ printf(_("%s %s -- get file access control lists\n"), ++ progname, VERSION); ++ printf(_("Usage: %s [-%s] file ...\n"), ++ progname, cmd_line_options); ++#if !POSIXLY_CORRECT ++ if (posixly_correct) { ++#endif ++ printf(_( ++" -d, --default display the default access control list\n")); ++#if !POSIXLY_CORRECT ++ } else { ++ printf(_( ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n")); ++ } ++#endif ++ printf(_( ++" -v, --version print version and exit\n" ++" -h, --help this help text\n")); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int opt; ++ char *line; ++ ++ progname = basename(argv[0]); ++ ++#if POSIXLY_CORRECT ++ cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; ++#else ++ if (getenv(POSIXLY_CORRECT_STR)) ++ posixly_correct = 1; ++ if (!posixly_correct) ++ cmd_line_options = CMD_LINE_OPTIONS; ++ else ++ cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; ++#endif ++ ++ setlocale(LC_CTYPE, ""); ++ setlocale(LC_MESSAGES, ""); ++ bindtextdomain(PACKAGE, LOCALEDIR); ++ textdomain(PACKAGE); ++ ++ /* Align `#effective:' comments to column 40 for tty's */ ++ if (!posixly_correct && isatty(fileno(stdout))) ++ print_options |= TEXT_SMART_INDENT; ++ ++ while ((opt = getopt_long(argc, argv, cmd_line_options, ++ long_options, NULL)) != -1) { ++ switch (opt) { ++ case 'a': /* acl only */ ++ if (posixly_correct) ++ goto synopsis; ++ opt_print_acl = 1; ++ break; ++ ++ case 'd': /* default acl only */ ++ opt_print_default_acl = 1; ++ break; ++ ++ case 'c': /* no comments */ ++ if (posixly_correct) ++ goto synopsis; ++ opt_comments = 0; ++ break; ++ ++ case 'e': /* all #effective comments */ ++ if (posixly_correct) ++ goto synopsis; ++ print_options |= TEXT_ALL_EFFECTIVE; ++ break; ++ ++ case 'E': /* no #effective comments */ ++ if (posixly_correct) ++ goto synopsis; ++ print_options &= ~(TEXT_SOME_EFFECTIVE | ++ TEXT_ALL_EFFECTIVE); ++ break; ++ ++ case 'R': /* recursive */ ++ if (posixly_correct) ++ goto synopsis; ++ walk_flags |= WALK_TREE_RECURSIVE; ++ break; ++ ++ case 'L': /* follow all symlinks */ ++ if (posixly_correct) ++ goto synopsis; ++ walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE; ++ walk_flags &= ~WALK_TREE_PHYSICAL; ++ break; ++ ++ case 'P': /* skip all symlinks */ ++ if (posixly_correct) ++ goto synopsis; ++ walk_flags |= WALK_TREE_PHYSICAL; ++ walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE | ++ WALK_TREE_DEREFERENCE_TOPLEVEL); ++ break; ++ ++ case 's': /* skip files with only base entries */ ++ if (posixly_correct) ++ goto synopsis; ++ opt_skip_base = 1; ++ break; ++ ++ case 'p': ++ if (posixly_correct) ++ goto synopsis; ++ opt_strip_leading_slash = 0; ++ break; ++ ++ case 't': ++ if (posixly_correct) ++ goto synopsis; ++ opt_tabular = 1; ++ break; ++ ++ case 'n': /* numeric */ ++ opt_numeric = 1; ++ print_options |= TEXT_NUMERIC_IDS; ++ break; ++ ++ case 'v': /* print version */ ++ printf("%s " VERSION "\n", progname); ++ return 0; ++ ++ case 'h': /* help */ ++ help(); ++ return 0; ++ ++ case ':': /* option missing */ ++ case '?': /* unknown option */ ++ default: ++ goto synopsis; ++ } ++ } ++ ++ if (!(opt_print_acl || opt_print_default_acl)) { ++ opt_print_acl = 1; ++ if (!posixly_correct) ++ opt_print_default_acl = 1; ++ } ++ ++ if ((optind == argc) && !posixly_correct) ++ goto synopsis; ++ ++ do { ++ if (optind == argc || ++ strcmp(argv[optind], "-") == 0) { ++ while ((line = next_line(stdin)) != NULL) { ++ if (*line == '\0') ++ continue; ++ ++ had_errors += walk_tree(line, walk_flags, 0, ++ do_print, NULL); ++ } ++ if (!feof(stdin)) { ++ fprintf(stderr, _("%s: Standard input: %s\n"), ++ progname, strerror(errno)); ++ had_errors++; ++ } ++ } else ++ had_errors += walk_tree(argv[optind], walk_flags, 0, ++ do_print, NULL); ++ optind++; ++ } while (optind < argc); ++ ++ return had_errors ? 1 : 0; ++ ++synopsis: ++ fprintf(stderr, _("Usage: %s [-%s] file ...\n"), ++ progname, cmd_line_options); ++ fprintf(stderr, _("Try `%s --help' for more information.\n"), ++ progname); ++ return 2; ++} ++ +diff --git a/tools/parse.c b/tools/parse.c +new file mode 100644 +index 0000000..e7e6add +--- /dev/null ++++ b/tools/parse.c +@@ -0,0 +1,594 @@ ++/* ++ File: parse.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999, 2000 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include "sys/acl.h" ++ ++#include "sequence.h" ++#include "parse.h" ++#include "misc.h" ++ ++#define SKIP_WS(x) ({ \ ++ while (*(x)==' ' || *(x)=='\t' || *(x)=='\n' || *(x)=='\r') \ ++ (x)++; \ ++ }) ++ ++ ++static int ++skip_tag_name( ++ const char **text_p, ++ const char *token) ++{ ++ size_t len = strlen(token); ++ const char *text = *text_p; ++ ++ SKIP_WS(text); ++ if (strncmp(text, token, len) == 0) { ++ text += len; ++ goto delimiter; ++ } ++ if (*text == *token) { ++ text++; ++ goto delimiter; ++ } ++ return 0; ++ ++delimiter: ++ SKIP_WS(text); ++ if (*text == ':') { ++ *text_p = text+1; ++ return 1; ++ } ++ if (*text == ',' || *text == '\0') { ++ *text_p = text; ++ return 1; ++ } ++ return 0; ++} ++ ++ ++static char * ++get_token( ++ const char **text_p) ++{ ++ char *token = NULL, *t; ++ const char *bp, *ep; ++ ++ bp = *text_p; ++ SKIP_WS(bp); ++ ep = bp; ++ ++ while (*ep!='\0' && *ep!='\r' && *ep!='\n' && *ep!=':' && *ep!=',') ++ ep++; ++ if (ep == bp) ++ goto after_token; ++ token = (char*)malloc(ep - bp + 1); ++ if (token == NULL) ++ goto after_token; ++ memcpy(token, bp, ep - bp); ++ ++ /* Trim trailing whitespace */ ++ t = token + (ep - bp - 1); ++ while (t >= token && ++ (*t==' ' || *t=='\t' || *t=='\n' || *t=='\r')) ++ t--; ++ *(t+1) = '\0'; ++ ++after_token: ++ if (*ep == ':') ++ ep++; ++ *text_p = ep; ++ return token; ++} ++ ++ ++static int ++get_id( ++ const char *token, ++ id_t *id_p) ++{ ++ char *ep; ++ long l; ++ l = strtol(token, &ep, 0); ++ if (*ep != '\0') ++ return -1; ++ if (l < 0) { ++ /* ++ Negative values are interpreted as 16-bit numbers, ++ so that id -2 maps to 65534 (nobody/nogroup), etc. ++ */ ++ l &= 0xFFFF; ++ } ++ *id_p = l; ++ return 0; ++} ++ ++ ++static int ++get_uid( ++ const char *token, ++ uid_t *uid_p) ++{ ++ struct passwd *passwd; ++ ++ if (get_id(token, (id_t *)uid_p) == 0) ++ goto accept; ++ passwd = getpwnam(token); ++ if (passwd) { ++ *uid_p = passwd->pw_uid; ++ goto accept; ++ } ++ return -1; ++ ++accept: ++ return 0; ++} ++ ++ ++static int ++get_gid( ++ const char *token, ++ gid_t *gid_p) ++{ ++ struct group *group; ++ ++ if (get_id(token, (id_t *)gid_p) == 0) ++ goto accept; ++ group = getgrnam(token); ++ if (group) { ++ *gid_p = group->gr_gid; ++ goto accept; ++ } ++ return -1; ++ ++accept: ++ return 0; ++} ++ ++ ++/* ++ Parses the next acl entry in text_p. ++ ++ Returns: ++ -1 on error, 0 on success. ++*/ ++ ++cmd_t ++parse_acl_cmd( ++ const char **text_p, ++ int seq_cmd, ++ int parse_mode) ++{ ++ cmd_t cmd = cmd_init(); ++ char *str; ++ const char *backup; ++ int error, perm_chars; ++ if (!cmd) ++ return NULL; ++ ++ cmd->c_cmd = seq_cmd; ++ if (parse_mode & SEQ_PROMOTE_ACL) ++ cmd->c_type = ACL_TYPE_DEFAULT; ++ else ++ cmd->c_type = ACL_TYPE_ACCESS; ++ cmd->c_id = ACL_UNDEFINED_ID; ++ cmd->c_perm = 0; ++ ++ if (parse_mode & SEQ_PARSE_DEFAULT) { ++ /* check for default acl entry */ ++ backup = *text_p; ++ if (skip_tag_name(text_p, "default")) { ++ if (parse_mode & SEQ_PROMOTE_ACL) { ++ /* if promoting from acl to default acl and ++ a default acl entry is found, fail. */ ++ *text_p = backup; ++ goto fail; ++ } ++ cmd->c_type = ACL_TYPE_DEFAULT; ++ } ++ } ++ ++ /* parse acl entry type */ ++ switch (**text_p) { ++ case 'u': /* user */ ++ skip_tag_name(text_p, "user"); ++ ++user_entry: ++ backup = *text_p; ++ str = get_token(text_p); ++ if (str) { ++ cmd->c_tag = ACL_USER; ++ error = get_uid(unquote(str), &cmd->c_id); ++ free(str); ++ if (error) { ++ *text_p = backup; ++ goto fail; ++ } ++ } else { ++ cmd->c_tag = ACL_USER_OBJ; ++ } ++ break; ++ ++ case 'g': /* group */ ++ if (!skip_tag_name(text_p, "group")) ++ goto user_entry; ++ ++ backup = *text_p; ++ str = get_token(text_p); ++ if (str) { ++ cmd->c_tag = ACL_GROUP; ++ error = get_gid(unquote(str), &cmd->c_id); ++ free(str); ++ if (error) { ++ *text_p = backup; ++ goto fail; ++ } ++ } else { ++ cmd->c_tag = ACL_GROUP_OBJ; ++ } ++ break; ++ ++ case 'o': /* other */ ++ if (!skip_tag_name(text_p, "other")) ++ goto user_entry; ++ /* skip empty entry qualifier field (this field may ++ be missing for compatibility with Solaris.) */ ++ SKIP_WS(*text_p); ++ if (**text_p == ':') ++ (*text_p)++; ++ cmd->c_tag = ACL_OTHER; ++ break; ++ ++ case 'm': /* mask */ ++ if (!skip_tag_name(text_p, "mask")) ++ goto user_entry; ++ /* skip empty entry qualifier field (this field may ++ be missing for compatibility with Solaris.) */ ++ SKIP_WS(*text_p); ++ if (**text_p == ':') ++ (*text_p)++; ++ cmd->c_tag = ACL_MASK; ++ break; ++ ++ default: /* assume "user:" */ ++ goto user_entry; ++ } ++ ++ SKIP_WS(*text_p); ++ if (**text_p == ',' || **text_p == '\0') { ++ if (parse_mode & SEQ_PARSE_NO_PERM) ++ return cmd; ++ else ++ goto fail; ++ } ++ if (!(parse_mode & SEQ_PARSE_WITH_PERM)) ++ return cmd; ++ ++ /* parse permissions */ ++ SKIP_WS(*text_p); ++ if (**text_p >= '0' && **text_p <= '7') { ++ cmd->c_perm = 0; ++ while (**text_p == '0') ++ (*text_p)++; ++ if (**text_p >= '1' && **text_p <= '7') { ++ cmd->c_perm = (*(*text_p)++ - '0'); ++ } ++ ++ return cmd; ++ } ++ ++ for (perm_chars=0; perm_chars<3; perm_chars++, (*text_p)++) { ++ switch(**text_p) { ++ case 'r': /* read */ ++ if (cmd->c_perm & CMD_PERM_READ) ++ goto fail; ++ cmd->c_perm |= CMD_PERM_READ; ++ break; ++ ++ case 'w': /* write */ ++ if (cmd->c_perm & CMD_PERM_WRITE) ++ goto fail; ++ cmd->c_perm |= CMD_PERM_WRITE; ++ break; ++ ++ case 'x': /* execute */ ++ if (cmd->c_perm & CMD_PERM_EXECUTE) ++ goto fail; ++ cmd->c_perm |= CMD_PERM_EXECUTE; ++ break; ++ ++ case 'X': /* execute only if directory or some ++ entries already have execute permissions ++ set */ ++ if (cmd->c_perm & CMD_PERM_COND_EXECUTE) ++ goto fail; ++ cmd->c_perm |= CMD_PERM_COND_EXECUTE; ++ break; ++ ++ case '-': ++ /* ignore */ ++ break; ++ ++ default: ++ if (perm_chars == 0) ++ goto fail; ++ return cmd; ++ } ++ } ++ if (perm_chars != 3) ++ goto fail; ++ return cmd; ++ ++fail: ++ cmd_free(cmd); ++ return NULL; ++} ++ ++ ++/* ++ Parse a comma-separated list of acl entries. ++ ++ which is set to the index of the first character that was not parsed, ++ or -1 in case of success. ++*/ ++int ++parse_acl_seq( ++ seq_t seq, ++ const char *text_p, ++ int *which, ++ int seq_cmd, ++ int parse_mode) ++{ ++ const char *initial_text_p = text_p; ++ cmd_t cmd; ++ ++ if (which) ++ *which = -1; ++ ++ while (*text_p != '\0') { ++ cmd = parse_acl_cmd(&text_p, seq_cmd, parse_mode); ++ if (cmd == NULL) { ++ errno = EINVAL; ++ goto fail; ++ } ++ if (seq_append(seq, cmd) != 0) { ++ cmd_free(cmd); ++ goto fail; ++ } ++ SKIP_WS(text_p); ++ if (*text_p != ',') ++ break; ++ text_p++; ++ } ++ ++ if (*text_p != '\0') { ++ errno = EINVAL; ++ goto fail; ++ } ++ ++ return 0; ++ ++fail: ++ if (which) ++ *which = (text_p - initial_text_p); ++ return -1; ++} ++ ++ ++ ++int ++read_acl_comments( ++ FILE *file, ++ int *line, ++ char **path_p, ++ uid_t *uid_p, ++ gid_t *gid_p, ++ mode_t *flags) ++{ ++ int c; ++ /* ++ Max PATH_MAX bytes even for UTF-8 path names and additional 9 ++ 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; ++ int comments_read = 0; ++ ++ if (path_p) ++ *path_p = NULL; ++ if (uid_p) ++ *uid_p = ACL_UNDEFINED_ID; ++ if (gid_p) ++ *gid_p = ACL_UNDEFINED_ID; ++ if (flags) ++ *flags = 0; ++ ++ for(;;) { ++ c = fgetc(file); ++ if (c == EOF) ++ break; ++ if (c==' ' || c=='\t' || c=='\r' || c=='\n') { ++ if (c=='\n') ++ (*line)++; ++ continue; ++ } ++ if (c != '#') { ++ ungetc(c, file); ++ break; ++ } ++ if (line) ++ (*line)++; ++ ++ if (fgets(linebuf, sizeof(linebuf), file) == NULL) ++ break; ++ ++ comments_read = 1; ++ ++ p = strrchr(linebuf, '\0'); ++ while (p > linebuf && ++ (*(p-1)=='\r' || *(p-1)=='\n')) { ++ p--; ++ *p = '\0'; ++ } ++ ++ cp = linebuf; ++ SKIP_WS(cp); ++ if (strncmp(cp, "file:", 5) == 0) { ++ cp += 5; ++ SKIP_WS(cp); ++ cp = unquote(cp); ++ ++ if (path_p) { ++ if (*path_p) ++ goto fail; ++ *path_p = (char*)malloc(strlen(cp)+1); ++ if (!*path_p) ++ return -1; ++ strcpy(*path_p, cp); ++ } ++ } else if (strncmp(cp, "owner:", 6) == 0) { ++ cp += 6; ++ SKIP_WS(cp); ++ ++ if (uid_p) { ++ if (*uid_p != ACL_UNDEFINED_ID) ++ goto fail; ++ if (get_uid(unquote(cp), uid_p) != 0) ++ continue; ++ } ++ } else if (strncmp(cp, "group:", 6) == 0) { ++ cp += 6; ++ SKIP_WS(cp); ++ ++ if (gid_p) { ++ if (*gid_p != ACL_UNDEFINED_ID) ++ goto fail; ++ if (get_gid(unquote(cp), gid_p) != 0) ++ continue; ++ } ++ } else if (strncmp(cp, "flags:", 6) == 0) { ++ mode_t f = 0; ++ ++ cp += 6; ++ SKIP_WS(cp); ++ ++ if (cp[0] == 's') ++ f |= S_ISUID; ++ else if (cp[0] != '-') ++ goto fail; ++ if (cp[1] == 's') ++ f |= S_ISGID; ++ else if (cp[1] != '-') ++ goto fail; ++ if (cp[2] == 't') ++ f |= S_ISVTX; ++ else if (cp[2] != '-') ++ goto fail; ++ if (cp[3] != '\0') ++ goto fail; ++ ++ if (flags) ++ *flags = f; ++ } ++ } ++ if (ferror(file)) ++ return -1; ++ return comments_read; ++fail: ++ if (path_p && *path_p) { ++ free(*path_p); ++ *path_p = NULL; ++ } ++ return -EINVAL; ++} ++ ++ ++int ++read_acl_seq( ++ FILE *file, ++ seq_t seq, ++ int seq_cmd, ++ int parse_mode, ++ int *line, ++ int *which) ++{ ++ char linebuf[1024]; ++ const char *cp; ++ cmd_t cmd; ++ ++ if (which) ++ *which = -1; ++ ++ for(;;) { ++ if (fgets(linebuf, sizeof(linebuf), file) == NULL) ++ break; ++ if (line) ++ (*line)++; ++ ++ cp = linebuf; ++ SKIP_WS(cp); ++ if (*cp == '\0') { ++ if (!(parse_mode & SEQ_PARSE_MULTI)) ++ continue; ++ break; ++ } else if (*cp == '#') { ++ continue; ++ } ++ ++ cmd = parse_acl_cmd(&cp, seq_cmd, parse_mode); ++ if (cmd == NULL) { ++ errno = EINVAL; ++ goto fail; ++ } ++ if (seq_append(seq, cmd) != 0) { ++ cmd_free(cmd); ++ goto fail; ++ } ++ ++ SKIP_WS(cp); ++ if (*cp != '\0' && *cp != '#') { ++ errno = EINVAL; ++ goto fail; ++ } ++ } ++ ++ if (ferror(file)) ++ goto fail; ++ return 0; ++ ++fail: ++ if (which) ++ *which = (cp - linebuf); ++ return -1; ++} ++ +diff --git a/tools/parse.h b/tools/parse.h +new file mode 100644 +index 0000000..b2e68b4 +--- /dev/null ++++ b/tools/parse.h +@@ -0,0 +1,85 @@ ++/* ++ File: parse.h ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999 by Andreas Gruenbacher ++ ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __PARSE_H ++#define __PARSE_H ++ ++ ++#include ++#include ++#include "sequence.h" ++ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++/* parse options */ ++ ++#define SEQ_PARSE_WITH_PERM (0x0001) ++#define SEQ_PARSE_NO_PERM (0x0002) ++#define SEQ_PARSE_ANY_PERM (0x0001|0x0002) ++ ++#define SEQ_PARSE_MULTI (0x0010) ++#define SEQ_PARSE_DEFAULT (0x0020) /* "default:" = default acl */ ++ ++#define SEQ_PROMOTE_ACL (0x0040) /* promote from acl ++ to default acl */ ++ ++cmd_t ++parse_acl_cmd( ++ const char **text_p, ++ int seq_cmd, ++ int parse_mode); ++int ++parse_acl_seq( ++ seq_t seq, ++ const char *text_p, ++ int *which, ++ int seq_cmd, ++ int parse_mode); ++int ++read_acl_comments( ++ FILE *file, ++ int *line, ++ char **path_p, ++ uid_t *uid_p, ++ gid_t *gid_p, ++ mode_t *flags); ++int ++read_acl_seq( ++ FILE *file, ++ seq_t seq, ++ int seq_cmd, ++ int parse_mode, ++ int *line, ++ int *which); ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ ++#endif /* __PARSE_H */ ++ +diff --git a/tools/sequence.c b/tools/sequence.c +new file mode 100644 +index 0000000..a418b23 +--- /dev/null ++++ b/tools/sequence.c +@@ -0,0 +1,162 @@ ++/* ++ File: sequence.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999, 2000 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++ ++#include ++#include "sequence.h" ++ ++ ++cmd_t ++cmd_init( ++ void) ++{ ++ return (cmd_t)malloc(sizeof(struct cmd_obj)); ++} ++ ++ ++void ++cmd_free( ++ cmd_t cmd) ++{ ++ free(cmd); ++} ++ ++ ++seq_t ++seq_init( ++ void) ++{ ++ seq_t seq = (seq_t)malloc(sizeof(struct seq_obj)); ++ if (seq == NULL) ++ return NULL; ++ seq->s_first = seq->s_last = NULL; ++ return seq; ++} ++ ++ ++int ++seq_free( ++ seq_t seq) ++{ ++ cmd_t cmd = seq->s_first; ++ while (cmd) { ++ seq->s_first = seq->s_first->c_next; ++ cmd_free(cmd); ++ cmd = seq->s_first; ++ } ++ free(seq); ++ return 0; ++} ++ ++ ++int ++seq_empty( ++ seq_t seq) ++{ ++ return (seq->s_first == NULL); ++} ++ ++ ++int ++seq_append( ++ seq_t seq, ++ cmd_t cmd) ++{ ++ cmd->c_next = NULL; ++ if (seq->s_first == NULL) { ++ seq->s_first = seq->s_last = cmd; ++ } else { ++ seq->s_last->c_next = cmd; ++ seq->s_last = cmd; ++ } ++ return 0; ++} ++ ++ ++int ++seq_append_cmd( ++ seq_t seq, ++ cmd_tag_t cmd, ++ acl_type_t type) ++{ ++ cmd_t cmd_d = cmd_init(); ++ if (cmd_d == NULL) ++ return -1; ++ cmd_d->c_cmd = cmd; ++ cmd_d->c_type = type; ++ if (seq_append(seq, cmd_d) != 0) { ++ cmd_free(cmd_d); ++ return -1; ++ } ++ return 0; ++} ++ ++ ++int ++seq_get_cmd( ++ seq_t seq, ++ int which, ++ cmd_t *cmd) ++{ ++ if (which == SEQ_FIRST_CMD) { ++ if (seq->s_first == NULL) ++ return 0; ++ if (cmd) ++ *cmd = seq->s_first; ++ return 1; ++ } else if (which == SEQ_NEXT_CMD) { ++ if (cmd == NULL) ++ return -1; ++ if (*cmd) { ++ *cmd = (*cmd)->c_next; ++ return (*cmd == NULL) ? 0 : 1; ++ } ++ return 0; ++ } else { ++ return -1; ++ } ++} ++ ++ ++int ++seq_delete_cmd( ++ seq_t seq, ++ cmd_t cmd) ++{ ++ cmd_t prev = seq->s_first; ++ ++ if (cmd == seq->s_first) { ++ seq->s_first = seq->s_first->c_next; ++ cmd_free(cmd); ++ return 0; ++ } ++ while (prev != NULL && prev->c_next != cmd) ++ prev = prev->c_next; ++ if (prev == NULL) ++ return -1; ++ if (cmd == seq->s_last) ++ seq->s_last = prev; ++ prev->c_next = cmd->c_next; ++ cmd_free(cmd); ++ return 0; ++} ++ +diff --git a/tools/sequence.h b/tools/sequence.h +new file mode 100644 +index 0000000..c5d7403 +--- /dev/null ++++ b/tools/sequence.h +@@ -0,0 +1,115 @@ ++/* ++ File: sequence.h ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999 by Andreas Gruenbacher ++ ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++ ++#ifndef __SEQUENCE_H ++#define __SEQUENCE_H ++ ++ ++#include ++ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++typedef unsigned int cmd_tag_t; ++ ++struct cmd_obj { ++ cmd_tag_t c_cmd; ++ acl_type_t c_type; ++ acl_tag_t c_tag; ++ uid_t c_id; ++ mode_t c_perm; ++ struct cmd_obj *c_next; ++}; ++ ++typedef struct cmd_obj *cmd_t; ++ ++struct seq_obj { ++ cmd_t s_first; ++ cmd_t s_last; ++}; ++ ++typedef struct seq_obj *seq_t; ++ ++/* command types */ ++#define CMD_ENTRY_REPLACE (0) ++#define CMD_REMOVE_ENTRY (3) ++#define CMD_REMOVE_EXTENDED_ACL (4) ++#define CMD_REMOVE_ACL (5) ++ ++/* constants for permission specifiers */ ++#define CMD_PERM_READ (4) ++#define CMD_PERM_WRITE (2) ++#define CMD_PERM_EXECUTE (1) ++#define CMD_PERM_COND_EXECUTE (8) ++ ++/* iteration over command sequence */ ++#define SEQ_FIRST_CMD (0) ++#define SEQ_NEXT_CMD (1) ++ ++/* command sequence manipulation */ ++ ++cmd_t ++cmd_init( ++ void); ++void ++cmd_free( ++ cmd_t cmd); ++seq_t ++seq_init( ++ void); ++int ++seq_free( ++ seq_t seq); ++int ++seq_empty( ++ seq_t seq); ++int ++seq_append( ++ seq_t seq, ++ cmd_t cmd); ++int ++seq_append_cmd( ++ seq_t seq, ++ cmd_tag_t cmd, ++ acl_type_t type); ++int ++seq_get_cmd( ++ seq_t seq, ++ int which, ++ cmd_t *cmd); ++int ++seq_delete_cmd( ++ seq_t seq, ++ cmd_t cmd); ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ ++#endif /* __SEQUENCE_H */ ++ +diff --git a/tools/setfacl.c b/tools/setfacl.c +new file mode 100644 +index 0000000..f6135b7 +--- /dev/null ++++ b/tools/setfacl.c +@@ -0,0 +1,669 @@ ++/* ++ File: setfacl.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999-2002 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#include "config.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "misc.h" ++#include "sequence.h" ++#include "parse.h" ++#include "do_set.h" ++#include "walk_tree.h" ++ ++#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT" ++ ++/* '-' stands for `process non-option arguments in loop' */ ++#if !POSIXLY_CORRECT ++# define CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:RLP" ++# define CMD_LINE_SPEC "[-bkndRLP] { -m|-M|-x|-X ... } file ..." ++#endif ++#define POSIXLY_CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:" ++#define POSIXLY_CMD_LINE_SPEC "[-bknd] {-m|-M|-x|-X ... } file ..." ++ ++struct option long_options[] = { ++#if !POSIXLY_CORRECT ++ { "set", 1, 0, 's' }, ++ { "set-file", 1, 0, 'S' }, ++ ++ { "mask", 0, 0, 'r' }, ++ { "recursive", 0, 0, 'R' }, ++ { "logical", 0, 0, 'L' }, ++ { "physical", 0, 0, 'P' }, ++ { "restore", 1, 0, 'B' }, ++ { "test", 0, 0, 't' }, ++#endif ++ { "modify", 1, 0, 'm' }, ++ { "modify-file", 1, 0, 'M' }, ++ { "remove", 1, 0, 'x' }, ++ { "remove-file", 1, 0, 'X' }, ++ ++ { "default", 0, 0, 'd' }, ++ { "no-mask", 0, 0, 'n' }, ++ { "remove-all", 0, 0, 'b' }, ++ { "remove-default", 0, 0, 'k' }, ++ { "version", 0, 0, 'v' }, ++ { "help", 0, 0, 'h' }, ++ { NULL, 0, 0, 0 }, ++}; ++ ++const char *progname; ++const char *cmd_line_options, *cmd_line_spec; ++ ++int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL; ++int opt_recalculate; /* recalculate mask entry (0=default, 1=yes, -1=no) */ ++int opt_promote; /* promote access ACL to default ACL */ ++int opt_test; /* do not write to the file system. ++ Print what would happen instead. */ ++#if POSIXLY_CORRECT ++const int posixly_correct = 1; /* Posix compatible behavior! */ ++#else ++int posixly_correct; /* Posix compatible behavior? */ ++#endif ++int chown_error; ++int promote_warning; ++ ++ ++static const char *xquote(const char *str, const char *quote_chars) ++{ ++ const char *q = quote(str, quote_chars); ++ if (q == NULL) { ++ fprintf(stderr, "%s: %s\n", progname, strerror(errno)); ++ exit(1); ++ } ++ return q; ++} ++ ++int ++has_any_of_type( ++ cmd_t cmd, ++ acl_type_t acl_type) ++{ ++ while (cmd) { ++ if (cmd->c_type == acl_type) ++ return 1; ++ cmd = cmd->c_next; ++ } ++ return 0; ++} ++ ++ ++#if !POSIXLY_CORRECT ++int ++restore( ++ FILE *file, ++ const char *filename) ++{ ++ char *path_p; ++ struct stat st; ++ uid_t uid; ++ gid_t gid; ++ mode_t mask, flags; ++ struct do_set_args args = { }; ++ int line = 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, ++ &flags); ++ if (error < 0) { ++ error = -error; ++ goto fail; ++ } ++ if (error == 0) ++ return status; ++ ++ if (path_p == NULL) { ++ if (filename) { ++ fprintf(stderr, _("%s: %s: No filename found " ++ "in line %d, aborting\n"), ++ progname, xquote(filename, "\n\r"), ++ backup_line); ++ } else { ++ fprintf(stderr, _("%s: No filename found in " ++ "line %d of standard input, " ++ "aborting\n"), ++ progname, backup_line); ++ } ++ status = 1; ++ goto getout; ++ } ++ ++ if (!(args.seq = seq_init())) ++ goto fail_errno; ++ if (seq_append_cmd(args.seq, CMD_REMOVE_ACL, ACL_TYPE_ACCESS) || ++ seq_append_cmd(args.seq, CMD_REMOVE_ACL, ACL_TYPE_DEFAULT)) ++ goto fail_errno; ++ ++ error = read_acl_seq(file, args.seq, CMD_ENTRY_REPLACE, ++ SEQ_PARSE_WITH_PERM | ++ SEQ_PARSE_DEFAULT | ++ SEQ_PARSE_MULTI, ++ &line, NULL); ++ if (error != 0) { ++ fprintf(stderr, _("%s: %s: %s in line %d\n"), ++ progname, xquote(filename, "\n\r"), strerror(errno), ++ line); ++ status = 1; ++ goto getout; ++ } ++ ++ error = stat(path_p, &st); ++ if (opt_test && error != 0) { ++ fprintf(stderr, "%s: %s: %s\n", progname, ++ xquote(path_p, "\n\r"), strerror(errno)); ++ status = 1; ++ } ++ ++ args.mode = 0; ++ error = do_set(path_p, &st, 0, &args); ++ if (error != 0) { ++ status = 1; ++ goto resume; ++ } ++ ++ if (uid != ACL_UNDEFINED_ID && uid != st.st_uid) ++ st.st_uid = uid; ++ else ++ st.st_uid = -1; ++ if (gid != ACL_UNDEFINED_ID && gid != st.st_gid) ++ st.st_gid = gid; ++ else ++ st.st_gid = -1; ++ if (!opt_test && ++ (st.st_uid != -1 || st.st_gid != -1)) { ++ if (chown(path_p, st.st_uid, st.st_gid) != 0) { ++ fprintf(stderr, _("%s: %s: Cannot change " ++ "owner/group: %s\n"), ++ progname, xquote(path_p, "\n\r"), ++ strerror(errno)); ++ status = 1; ++ } ++ ++ /* chown() clears setuid/setgid so force a chmod if ++ * S_ISUID/S_ISGID was expected */ ++ if ((st.st_mode & flags) & (S_ISUID | S_ISGID)) ++ chmod_required = 1; ++ } ++ ++ mask = S_ISUID | S_ISGID | S_ISVTX; ++ if (chmod_required || ((st.st_mode & mask) != (flags & mask))) { ++ if (!args.mode) ++ args.mode = st.st_mode; ++ args.mode &= (S_IRWXU | S_IRWXG | S_IRWXO); ++ if (chmod(path_p, flags | args.mode) != 0) { ++ fprintf(stderr, _("%s: %s: Cannot change " ++ "mode: %s\n"), ++ progname, xquote(path_p, "\n\r"), ++ strerror(errno)); ++ status = 1; ++ } ++ } ++resume: ++ if (path_p) { ++ free(path_p); ++ path_p = NULL; ++ } ++ if (args.seq) { ++ seq_free(args.seq); ++ args.seq = NULL; ++ } ++ } ++ ++getout: ++ if (path_p) { ++ free(path_p); ++ path_p = NULL; ++ } ++ if (args.seq) { ++ seq_free(args.seq); ++ args.seq = NULL; ++ } ++ return status; ++ ++fail_errno: ++ error = errno; ++fail: ++ fprintf(stderr, "%s: %s: %s\n", progname, xquote(filename, "\n\r"), ++ strerror(error)); ++ status = 1; ++ goto getout; ++} ++#endif ++ ++ ++void help(void) ++{ ++ printf(_("%s %s -- set file access control lists\n"), ++ progname, VERSION); ++ printf(_("Usage: %s %s\n"), ++ progname, cmd_line_spec); ++ printf(_( ++" -m, --modify=acl modify the current ACL(s) of file(s)\n" ++" -M, --modify-file=file read ACL entries to modify from file\n" ++" -x, --remove=acl remove entries from the ACL(s) of file(s)\n" ++" -X, --remove-file=file read ACL entries to remove from file\n" ++" -b, --remove-all remove all extended ACL entries\n" ++" -k, --remove-default remove the default ACL\n")); ++#if !POSIXLY_CORRECT ++ if (!posixly_correct) { ++ printf(_( ++" --set=acl set the ACL of file(s), replacing the current ACL\n" ++" --set-file=file read ACL entries to set from file\n" ++" --mask do recalculate the effective rights mask\n")); ++ } ++#endif ++ printf(_( ++" -n, --no-mask don't recalculate the effective rights mask\n" ++" -d, --default operations apply to the default ACL\n")); ++#if !POSIXLY_CORRECT ++ if (!posixly_correct) { ++ printf(_( ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" --restore=file restore ACLs (inverse of `getfacl -R')\n" ++" --test test mode (ACLs are not modified)\n")); ++ } ++#endif ++ printf(_( ++" -v, --version print version and exit\n" ++" -h, --help this help text\n")); ++} ++ ++ ++int next_file(const char *arg, seq_t seq) ++{ ++ char *line; ++ int errors = 0; ++ struct do_set_args args; ++ ++ args.seq = seq; ++ ++ if (strcmp(arg, "-") == 0) { ++ while ((line = next_line(stdin))) ++ errors = walk_tree(line, walk_flags, 0, do_set, &args); ++ if (!feof(stdin)) { ++ fprintf(stderr, _("%s: Standard input: %s\n"), ++ progname, strerror(errno)); ++ errors = 1; ++ } ++ } else { ++ errors = walk_tree(arg, walk_flags, 0, do_set, &args); ++ } ++ return errors ? 1 : 0; ++} ++ ++ ++#define ERRNO_ERROR(s) \ ++ ({status = (s); goto errno_error; }) ++ ++ ++int main(int argc, char *argv[]) ++{ ++ int opt; ++ int saw_files = 0; ++ int status = 0; ++ FILE *file; ++ int which; ++ int lineno; ++ int error; ++ seq_t seq; ++ int seq_cmd, parse_mode; ++ ++ progname = basename(argv[0]); ++ ++#if POSIXLY_CORRECT ++ cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; ++ cmd_line_spec = _(POSIXLY_CMD_LINE_SPEC); ++#else ++ if (getenv(POSIXLY_CORRECT_STR)) ++ posixly_correct = 1; ++ if (!posixly_correct) { ++ cmd_line_options = CMD_LINE_OPTIONS; ++ cmd_line_spec = _(CMD_LINE_SPEC); ++ } else { ++ cmd_line_options = POSIXLY_CMD_LINE_OPTIONS; ++ cmd_line_spec = _(POSIXLY_CMD_LINE_SPEC); ++ } ++#endif ++ ++ setlocale(LC_CTYPE, ""); ++ setlocale(LC_MESSAGES, ""); ++ bindtextdomain(PACKAGE, LOCALEDIR); ++ textdomain(PACKAGE); ++ ++ seq = seq_init(); ++ if (!seq) ++ ERRNO_ERROR(1); ++ ++ while ((opt = getopt_long(argc, argv, cmd_line_options, ++ long_options, NULL)) != -1) { ++ /* we remember the two REMOVE_ACL commands of the set ++ operations because we may later need to delete them. */ ++ cmd_t seq_remove_default_acl_cmd = NULL; ++ cmd_t seq_remove_acl_cmd = NULL; ++ ++ if (opt != '\1' && saw_files) { ++ seq_free(seq); ++ seq = seq_init(); ++ if (!seq) ++ ERRNO_ERROR(1); ++ saw_files = 0; ++ } ++ ++ switch (opt) { ++ case 'b': /* remove all extended entries */ ++ if (seq_append_cmd(seq, CMD_REMOVE_EXTENDED_ACL, ++ ACL_TYPE_ACCESS) || ++ seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_DEFAULT)) ++ ERRNO_ERROR(1); ++ break; ++ ++ case 'k': /* remove default ACL */ ++ if (seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_DEFAULT)) ++ ERRNO_ERROR(1); ++ break; ++ ++ case 'n': /* do not recalculate mask */ ++ opt_recalculate = -1; ++ break; ++ ++ case 'r': /* force recalculate mask */ ++ opt_recalculate = 1; ++ break; ++ ++ case 'd': /* operations apply to default ACL */ ++ opt_promote = 1; ++ break; ++ ++ case 's': /* set */ ++ if (seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_ACCESS)) ++ ERRNO_ERROR(1); ++ seq_remove_acl_cmd = seq->s_last; ++ if (seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_DEFAULT)) ++ ERRNO_ERROR(1); ++ seq_remove_default_acl_cmd = seq->s_last; ++ ++ seq_cmd = CMD_ENTRY_REPLACE; ++ parse_mode = SEQ_PARSE_WITH_PERM; ++ goto set_modify_delete; ++ ++ case 'm': /* modify */ ++ seq_cmd = CMD_ENTRY_REPLACE; ++ parse_mode = SEQ_PARSE_WITH_PERM; ++ goto set_modify_delete; ++ ++ case 'x': /* delete */ ++ seq_cmd = CMD_REMOVE_ENTRY; ++#if POSIXLY_CORRECT ++ parse_mode = SEQ_PARSE_ANY_PERM; ++#else ++ if (posixly_correct) ++ parse_mode = SEQ_PARSE_ANY_PERM; ++ else ++ parse_mode = SEQ_PARSE_NO_PERM; ++#endif ++ goto set_modify_delete; ++ ++ set_modify_delete: ++ if (!posixly_correct) ++ parse_mode |= SEQ_PARSE_DEFAULT; ++ if (opt_promote) ++ parse_mode |= SEQ_PROMOTE_ACL; ++ if (parse_acl_seq(seq, optarg, &which, ++ seq_cmd, parse_mode) != 0) { ++ if (which < 0 || ++ (size_t) which >= strlen(optarg)) { ++ fprintf(stderr, _( ++ "%s: Option " ++ "-%c incomplete\n"), ++ progname, opt); ++ } else { ++ fprintf(stderr, _( ++ "%s: Option " ++ "-%c: %s near " ++ "character %d\n"), ++ progname, opt, ++ strerror(errno), ++ which+1); ++ } ++ status = 2; ++ goto cleanup; ++ } ++ break; ++ ++ case 'S': /* set from file */ ++ if (seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_ACCESS)) ++ ERRNO_ERROR(1); ++ seq_remove_acl_cmd = seq->s_last; ++ if (seq_append_cmd(seq, CMD_REMOVE_ACL, ++ ACL_TYPE_DEFAULT)) ++ ERRNO_ERROR(1); ++ seq_remove_default_acl_cmd = seq->s_last; ++ ++ seq_cmd = CMD_ENTRY_REPLACE; ++ parse_mode = SEQ_PARSE_WITH_PERM; ++ goto set_modify_delete_from_file; ++ ++ case 'M': /* modify from file */ ++ seq_cmd = CMD_ENTRY_REPLACE; ++ parse_mode = SEQ_PARSE_WITH_PERM; ++ goto set_modify_delete_from_file; ++ ++ case 'X': /* delete from file */ ++ seq_cmd = CMD_REMOVE_ENTRY; ++#if POSIXLY_CORRECT ++ parse_mode = SEQ_PARSE_ANY_PERM; ++#else ++ if (posixly_correct) ++ parse_mode = SEQ_PARSE_ANY_PERM; ++ else ++ parse_mode = SEQ_PARSE_NO_PERM; ++#endif ++ goto set_modify_delete_from_file; ++ ++ set_modify_delete_from_file: ++ if (!posixly_correct) ++ parse_mode |= SEQ_PARSE_DEFAULT; ++ if (opt_promote) ++ parse_mode |= SEQ_PROMOTE_ACL; ++ if (strcmp(optarg, "-") == 0) { ++ file = stdin; ++ } else { ++ file = fopen(optarg, "r"); ++ if (file == NULL) { ++ fprintf(stderr, "%s: %s: %s\n", ++ progname, ++ xquote(optarg, "\n\r"), ++ strerror(errno)); ++ status = 2; ++ goto cleanup; ++ } ++ } ++ ++ lineno = 0; ++ error = read_acl_seq(file, seq, seq_cmd, ++ parse_mode, &lineno, NULL); ++ ++ if (file != stdin) { ++ fclose(file); ++ } ++ ++ if (error) { ++ if (!errno) ++ errno = EINVAL; ++ ++ if (file != stdin) { ++ fprintf(stderr, _( ++ "%s: %s in line " ++ "%d of file %s\n"), ++ progname, ++ strerror(errno), ++ lineno, ++ xquote(optarg, "\n\r")); ++ } else { ++ fprintf(stderr, _( ++ "%s: %s in line " ++ "%d of standard " ++ "input\n"), progname, ++ strerror(errno), ++ lineno); ++ } ++ status = 2; ++ goto cleanup; ++ } ++ break; ++ ++ ++ case '\1': /* file argument */ ++ if (seq_empty(seq)) ++ goto synopsis; ++ saw_files = 1; ++ ++ status = next_file(optarg, seq); ++ break; ++ ++ case 'B': /* restore ACL backup */ ++ saw_files = 1; ++ ++ if (strcmp(optarg, "-") == 0) ++ file = stdin; ++ else { ++ file = fopen(optarg, "r"); ++ if (file == NULL) { ++ fprintf(stderr, "%s: %s: %s\n", ++ progname, ++ xquote(optarg, "\n\r"), ++ strerror(errno)); ++ status = 2; ++ goto cleanup; ++ } ++ } ++ ++ status = restore(file, ++ (file == stdin) ? NULL : optarg); ++ ++ if (file != stdin) ++ fclose(file); ++ if (status != 0) ++ goto cleanup; ++ break; ++ ++ case 'R': /* recursive */ ++ walk_flags |= WALK_TREE_RECURSIVE; ++ break; ++ ++ case 'L': /* follow symlinks */ ++ walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE; ++ walk_flags &= ~WALK_TREE_PHYSICAL; ++ break; ++ ++ case 'P': /* do not follow symlinks */ ++ walk_flags |= WALK_TREE_PHYSICAL; ++ walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE | ++ WALK_TREE_DEREFERENCE_TOPLEVEL); ++ break; ++ ++ case 't': /* test mode */ ++ opt_test = 1; ++ break; ++ ++ case 'v': /* print version and exit */ ++ printf("%s " VERSION "\n", progname); ++ status = 0; ++ goto cleanup; ++ ++ case 'h': /* help! */ ++ help(); ++ status = 0; ++ goto cleanup; ++ ++ case ':': /* option missing */ ++ case '?': /* unknown option */ ++ default: ++ goto synopsis; ++ } ++ if (seq_remove_acl_cmd) { ++ /* This was a set operation. Check if there are ++ actually entries of ACL_TYPE_ACCESS; if there ++ are none, we need to remove this command! */ ++ if (!has_any_of_type(seq_remove_acl_cmd->c_next, ++ ACL_TYPE_ACCESS)) ++ seq_delete_cmd(seq, seq_remove_acl_cmd); ++ } ++ if (seq_remove_default_acl_cmd) { ++ /* This was a set operation. Check if there are ++ actually entries of ACL_TYPE_DEFAULT; if there ++ are none, we need to remove this command! */ ++ if (!has_any_of_type(seq_remove_default_acl_cmd->c_next, ++ ACL_TYPE_DEFAULT)) ++ seq_delete_cmd(seq, seq_remove_default_acl_cmd); ++ } ++ } ++ while (optind < argc) { ++ if(!seq) ++ goto synopsis; ++ if (seq_empty(seq)) ++ goto synopsis; ++ saw_files = 1; ++ ++ status = next_file(argv[optind++], seq); ++ } ++ if (!saw_files) ++ goto synopsis; ++ ++ goto cleanup; ++ ++synopsis: ++ fprintf(stderr, _("Usage: %s %s\n"), ++ progname, cmd_line_spec); ++ fprintf(stderr, _("Try `%s --help' for more information.\n"), ++ progname); ++ status = 2; ++ goto cleanup; ++ ++errno_error: ++ fprintf(stderr, "%s: %s\n", progname, strerror(errno)); ++ goto cleanup; ++ ++cleanup: ++ if (seq) ++ seq_free(seq); ++ return status; ++} ++ +diff --git a/tools/user_group.c b/tools/user_group.c +new file mode 100644 +index 0000000..61fa0c3 +--- /dev/null ++++ b/tools/user_group.c +@@ -0,0 +1,59 @@ ++/* ++ File: user_group.c ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999, 2000 ++ Andreas Gruenbacher, ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ USA. ++*/ ++ ++#include ++#include ++#include "user_group.h" ++ ++ ++const char * ++user_name(uid_t uid, int numeric) ++{ ++ struct passwd *passwd = numeric ? NULL : getpwuid(uid); ++ static char uid_str[22]; ++ int ret; ++ ++ if (passwd != NULL) ++ return passwd->pw_name; ++ ret = snprintf(uid_str, sizeof(uid_str), "%ld", (long)uid); ++ if (ret < 1 || (size_t)ret >= sizeof(uid_str)) ++ return "?"; ++ return uid_str; ++} ++ ++ ++const char * ++group_name(gid_t gid, int numeric) ++{ ++ struct group *group = numeric ? NULL : getgrgid(gid); ++ static char gid_str[22]; ++ int ret; ++ ++ if (group != NULL) ++ return group->gr_name; ++ ret = snprintf(gid_str, sizeof(gid_str), "%ld", (long)gid); ++ if (ret < 1 || (size_t)ret >= sizeof(gid_str)) ++ return "?"; ++ return gid_str; ++} ++ +diff --git a/tools/user_group.h b/tools/user_group.h +new file mode 100644 +index 0000000..aad5846 +--- /dev/null ++++ b/tools/user_group.h +@@ -0,0 +1,31 @@ ++/* ++ File: user_group.h ++ (Linux Access Control List Management) ++ ++ Copyright (C) 1999 by Andreas Gruenbacher ++ ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++*/ ++ ++#include ++#include ++#include ++ ++const char * ++user_name(uid_t uid, int numeric); ++const char * ++group_name(gid_t uid, int numeric); ++ +-- +2.5.2 + diff --git a/0014-po-regenerate-files-after-move.patch b/0014-po-regenerate-files-after-move.patch new file mode 100644 index 0000000..0eeb1ad --- /dev/null +++ b/0014-po-regenerate-files-after-move.patch @@ -0,0 +1,3073 @@ +From 6825f9fa1b8ee4b9760a1f47d71f45ec2b4b8045 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 10 Jan 2014 10:07:42 -0500 +Subject: [PATCH 14/34] po: regenerate files after move + +--- + po/de.po | 355 +++++++++++++++++++++++++++++++---------------------------- + po/es.po | 377 ++++++++++++++++++++++++++++++++------------------------------- + po/fr.po | 372 ++++++++++++++++++++++++++++++++------------------------------ + po/gl.po | 376 +++++++++++++++++++++++++++++++------------------------------- + po/pl.po | 368 +++++++++++++++++++++++++++++++------------------------------ + po/sv.po | 366 +++++++++++++++++++++++++++++++------------------------------ + 6 files changed, 1133 insertions(+), 1081 deletions(-) + +diff --git a/po/de.po b/po/de.po +index 42bf33a..95084dd 100644 +--- a/po/de.po ++++ b/po/de.po +@@ -18,159 +18,166 @@ + msgid "" + msgstr "" + "Project-Id-Version: acl-2.1.2\n" +-"POT-Creation-Date: 2002-11-22 18:28+0100\n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2003-01-23 00:08GMT\n" + "Last-Translator: Andreas Grünbacher \n" + "Language-Team: \n" ++"Language: de\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +-#: ../chacl/chacl.c:59 +-msgid "Usage:\n" +-msgstr "Verwendung:\n" +- +-#: ../chacl/chacl.c:60 +-#, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s acl pfadname...\n" +- +-#: ../chacl/chacl.c:61 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b acl dacl pfadname...\n" +- +-#: ../chacl/chacl.c:62 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d dacl pfadname...\n" +- +-#: ../chacl/chacl.c:63 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R pfadname...\n" +- +-#: ../chacl/chacl.c:64 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D pfadname...\n" +- +-#: ../chacl/chacl.c:65 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B pfadname...\n" ++msgid "setting permissions for %s" ++msgstr "Setzen der Zugriffsrechte für %s" + +-#: ../chacl/chacl.c:66 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l pfadname...\t[nicht IRIX-kompatibel]\n" ++msgid "preserving permissions for %s" ++msgstr "Erhalten der Zugriffsrechte für %s" + +-#: ../chacl/chacl.c:68 +-#, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r pfadname...\t[nicht IRIX-kompatibel]\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Mehrere Einträge gleichen Typs" + +-#: ../chacl/chacl.c:154 +-#, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s: Fehler beim Entfernen der Zugriffs-ACL von \"%s\": %s\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Doppelte Einträge" + +-#: ../chacl/chacl.c:161 +-#, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" +-msgstr "%s: Fehler beim Entfernen der Vorgabe-ACL von \"%s\": %s\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Fehlender oder falscher Eintrag" + +-#: ../chacl/chacl.c:180 ../chacl/chacl.c:199 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s: Zugriffs-ACL '%s': %s bei Eintrag %d\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Ungültiger Eintragstyp" + +-#: ../chacl/chacl.c:267 ++#: tools/getfacl.c:488 + #, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s: Kann Zugriffs-ACL von '%s' nicht ermitteln: %s\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s: Entferne führende '/' von absoluten Pfadnamen\n" + +-#: ../chacl/chacl.c:273 ++#: tools/getfacl.c:559 + #, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s: Kann Vorgabe-ACL von '%s' nicht ermitteln: %s\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- Datei-Zugriffskontrollisten (ACLs) anzeigen\n" + +-#: ../chacl/chacl.c:279 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s: Kann den Text zur Zugriffs-ACL von '%s' nicht ermitteln: %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Aufruf: %s [-%s] datei ...\n" + +-#: ../chacl/chacl.c:286 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s: Kann den Text zur Vorgabe-ACL von '%s' nicht ermitteln: %s\n" ++msgid " -d, --default display the default access control list\n" ++msgstr " -d, --default Die Vorgabe-ACL ausgeben\n" + +-#: ../chacl/chacl.c:312 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s: Kann die Zugriffs-ACL von \"%s\" nicht setzen: %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access Nur die Zugriffs-ACL ausgeben\n" ++" -d, --default Nur die Vorgabe-ACL ausgeben\n" ++" --omit-header Keine Datei-Kommentare ausgeben\n" ++" --all-effective Alle Effektivrechte-Kommentare ausgeben\n" ++" --no-effective Keine Effektivrechte-Kommentare ausgeben\n" ++" --skip-base Ãœberspringe Dateien mit Basiseinträgen\n" ++" -R, --recursive In Unterverzeichnisse wechseln\n" ++" -L, --logical Symbolische Links verfolgen\n" ++" -P, --physical Symbolische Links nicht verfolgen\n" ++" --tabular Tabellarisches Ausgabeformat verwenden\n" ++" --numeric Numerische Benutzer-/Gruppenkennungen ausgeben\n" ++" --absolute-names Führende '/' in Pfadnamen nicht entfernen\n" + +-#: ../chacl/chacl.c:318 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s: Kann die Vorgabe-ACL von \"%s\" nicht setzen: %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version Die Version ausgeben\n" ++" --help Diese Hilfe\n" + +-#: ../chacl/chacl.c:336 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s: opendir ist fehlgeschlagen: %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s: Standardeingabe: %s\n" + +-#: ../chacl/chacl.c:350 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s: malloc ist fehlgeschlagen: %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "Weiterführende Informationen mit `%s --help'.\n" + +-#: ../setfacl/do_set.c:404 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s: %s: Ungültige Zugriffs-ACL `%s': %s bei Eintrag %d\n" + +-#: ../setfacl/do_set.c:431 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "%s: %s: Ungültige Vorgabe-ACL `%s': %s bei Eintrag %d\n" + +-#: ../setfacl/do_set.c:494 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "%s: %s: Nur Verzeichnisse können Vorgabe-ACLs haben\n" + +-#: ../setfacl/setfacl.c:140 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s: %s: Kein Dateiname in Zeile %d gefunden; Abbruch\n" + +-#: ../setfacl/setfacl.c:144 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" + msgstr "%s: Kein Dateiname in Zeile %d der Standardeingabe gefunden; Abbruch\n" + +-#: ../setfacl/setfacl.c:165 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s: %s: %s in Zeile %d\n" + +-#: ../setfacl/setfacl.c:188 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s: %s: Kann Besitzer/Gruppe nicht ändern: %s\n" + +-#: ../setfacl/setfacl.c:226 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s: %s: Kann Besitzer/Gruppe nicht ändern: %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" + msgstr "%s %s -- Datei-Zugriffskontrollisten (ACLs) ändern\n" + +-#: ../setfacl/setfacl.c:228 ../setfacl/setfacl.c:674 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Verwendung: %s %s\n" + +-#: ../setfacl/setfacl.c:231 ++#: tools/setfacl.c:272 ++#, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" + " -M, --modify-file=file read ACL entries to modify from file\n" +@@ -186,7 +193,8 @@ msgstr "" + " -b, --remove-all Alle erweiterten ACL-Einträge entfernen\n" + " -k, --remove-default Vorgabe-ACL entfernen\n" + +-#: ../setfacl/setfacl.c:240 ++#: tools/setfacl.c:281 ++#, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" + " --set-file=file read ACL entries to set from file\n" +@@ -196,7 +204,8 @@ msgstr "" + " --set-file=datei Lies die ACL-Einträge aus datei\n" + " --mask Effektive Rechte nicht neu berechnen\n" + +-#: ../setfacl/setfacl.c:246 ++#: tools/setfacl.c:287 ++#, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" + " -d, --default operations apply to the default ACL\n" +@@ -204,7 +213,8 @@ msgstr "" + " -n, --no-mask Effektive Rechte nicht neu berechnen\n" + " -d, --default Bearbeite die Vorgabe-ACL\n" + +-#: ../setfacl/setfacl.c:251 ++#: tools/setfacl.c:292 ++#, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" + " -L, --logical logical walk, follow symbolic links\n" +@@ -218,117 +228,122 @@ msgstr "" + " --restore=datei ACLs wiederherstellen (Umkehr von `getfacl -R')\n" + " --test Testmodus (ACLs werden nicht verändert)\n" + +-#: ../setfacl/setfacl.c:259 ../getfacl/getfacl.c:543 +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version Die Version ausgeben\n" +-" --help Diese Hilfe\n" +- +-#: ../setfacl/setfacl.c:468 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s: Option -%c unvollständig\n" + +-#: ../setfacl/setfacl.c:473 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s: Option -%c: %s bei Zeichen %d\n" + +-#: ../setfacl/setfacl.c:558 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s: %s in Zeile %d der Datei %s\n" + +-#: ../setfacl/setfacl.c:566 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s: %s in Zeile %d der Standardeingabe\n" + +-#: ../setfacl/setfacl.c:676 ../getfacl/getfacl.c:749 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "Weiterführende Informationen mit `%s --help'.\n" ++msgid "Usage:\n" ++msgstr "Verwendung:\n" + +-#: ../getfacl/getfacl.c:449 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s: Entferne führende '/' von absoluten Pfadnamen\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s acl pfadname...\n" + +-#: ../getfacl/getfacl.c:516 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- Datei-Zugriffskontrollisten (ACLs) anzeigen\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b acl dacl pfadname...\n" + +-#: ../getfacl/getfacl.c:518 ../getfacl/getfacl.c:747 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Aufruf: %s [-%s] datei ...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d dacl pfadname...\n" + +-#: ../getfacl/getfacl.c:524 +-msgid " -d, --default display the default access control list\n" +-msgstr " -d, --default Die Vorgabe-ACL ausgeben\n" ++#: tools/chacl.c:50 ++#, c-format ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R pfadname...\n" + +-#: ../getfacl/getfacl.c:528 +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access Nur die Zugriffs-ACL ausgeben\n" +-" -d, --default Nur die Vorgabe-ACL ausgeben\n" +-" --omit-header Keine Datei-Kommentare ausgeben\n" +-" --all-effective Alle Effektivrechte-Kommentare ausgeben\n" +-" --no-effective Keine Effektivrechte-Kommentare ausgeben\n" +-" --skip-base Ãœberspringe Dateien mit Basiseinträgen\n" +-" -R, --recursive In Unterverzeichnisse wechseln\n" +-" -L, --logical Symbolische Links verfolgen\n" +-" -P, --physical Symbolische Links nicht verfolgen\n" +-" --tabular Tabellarisches Ausgabeformat verwenden\n" +-" --numeric Numerische Benutzer-/Gruppenkennungen ausgeben\n" +-" --absolute-names Führende '/' in Pfadnamen nicht entfernen\n" ++#: tools/chacl.c:51 ++#, c-format ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D pfadname...\n" + +-#: ../getfacl/getfacl.c:735 ++#: tools/chacl.c:52 + #, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s: Standardeingabe: %s\n" ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B pfadname...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Mehrere Einträge gleichen Typs" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l pfadname...\t[nicht IRIX-kompatibel]\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Doppelte Einträge" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r pfadname...\t[nicht IRIX-kompatibel]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Fehlender oder falscher Eintrag" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s: Fehler beim Entfernen der Zugriffs-ACL von \"%s\": %s\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Ungültiger Eintragstyp" ++#: tools/chacl.c:153 ++#, c-format ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s: Fehler beim Entfernen der Vorgabe-ACL von \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:122 ../libacl/perm_copy_fd.c:132 +-#: ../libacl/perm_copy_fd.c:183 ../libacl/perm_copy_file.c:122 +-#: ../libacl/perm_copy_file.c:135 ../libacl/perm_copy_file.c:144 +-#: ../libacl/perm_copy_file.c:214 ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "setting permissions for %s" +-msgstr "Setzen der Zugriffsrechte für %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s: Zugriffs-ACL '%s': %s bei Eintrag %d\n" + +-#: ../libacl/perm_copy_fd.c:172 ../libacl/perm_copy_file.c:183 +-#: ../libacl/perm_copy_file.c:205 ++#: tools/chacl.c:259 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "Erhalten der Zugriffsrechte für %s" ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s: Kann Zugriffs-ACL von '%s' nicht ermitteln: %s\n" ++ ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s: Kann Vorgabe-ACL von '%s' nicht ermitteln: %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s: Kann den Text zur Zugriffs-ACL von '%s' nicht ermitteln: %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s: Kann den Text zur Vorgabe-ACL von '%s' nicht ermitteln: %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s: Kann die Zugriffs-ACL von \"%s\" nicht setzen: %s\n" ++ ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s: Kann die Vorgabe-ACL von \"%s\" nicht setzen: %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s: opendir ist fehlgeschlagen: %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s: malloc ist fehlgeschlagen: %s\n" +diff --git a/po/es.po b/po/es.po +index be464d8..058b737 100644 +--- a/po/es.po ++++ b/po/es.po +@@ -18,164 +18,173 @@ + msgid "" + msgstr "" + "Project-Id-Version: acl-2.2.43.1\n" +-"Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2007-03-16 19:00+0100\n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2007-03-16 23:25+0100\n" + "Last-Translator: Antonio Trueba \n" + "Language-Team: Spanish\n" ++"Language: es\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=utf-8\n" + "Content-Transfer-Encoding: 8bit\n" + "X-Poedit-Language: Spanish\n" + +-#: ../chacl/chacl.c:45 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "Usage:\n" +-msgstr "Uso:\n" +- +-#: ../chacl/chacl.c:46 +-#, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s nombre de ruta de ACL...\n" +- +-#: ../chacl/chacl.c:47 +-#, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b nombre de ruta ACL DACL...\n" +- +-#: ../chacl/chacl.c:48 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d nombre de ruta de ACL...\n" +- +-#: ../chacl/chacl.c:49 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R ruta...\n" +- +-#: ../chacl/chacl.c:50 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D ruta...\n" +- +-#: ../chacl/chacl.c:51 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B ruta...\n" ++msgid "setting permissions for %s" ++msgstr "estableciendo permisos a %s" + +-#: ../chacl/chacl.c:52 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l ruta...\t[no compatible con IRIX]\n" ++msgid "preserving permissions for %s" ++msgstr "manteniendo permisos a %s" + +-#: ../chacl/chacl.c:54 +-#, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r ruta...\t[no compatible con IRIX]\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Múltiples entradas del mismo tipo" + +-#: ../chacl/chacl.c:145 +-#, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s: error borrando ACL de acceso en \"%s\": %s\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Entradas duplicadas" + +-#: ../chacl/chacl.c:152 +-#, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" +-msgstr "%s: error borrando ACL predeterminado en \"%s\": %s\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Falta una posición o es errónea" + +-#: ../chacl/chacl.c:171 +-#: ../chacl/chacl.c:190 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s: ACL de acceso '%s': %s en posición %d\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Tipo de posición inválido" + +-#: ../chacl/chacl.c:258 ++#: tools/getfacl.c:488 + #, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s: no se pudo obtener ACL de acceso en '%s': %s\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s: Eliminando '/' inicial en nombres de ruta absolutos\n" + +-#: ../chacl/chacl.c:264 ++#: tools/getfacl.c:559 + #, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s: no se pudo obtener ACL predeterminado en '%s': %s\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- obtener listas de control de acceso a archivo\n" + +-#: ../chacl/chacl.c:270 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s: no se pudo obtener texto ACL de acceso en '%s': %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Uso: %s [-%s] archivo ...\n" + +-#: ../chacl/chacl.c:277 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s: no se pudo obtener texto de ACL predeterminado en '%s': %s\n" ++msgid " -d, --default display the default access control list\n" ++msgstr "" ++" -d, --default mostrar la lista de control de acceso " ++"predeterminada\n" + +-#: ../chacl/chacl.c:303 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s: no se pudo establecer ACL de acceso en \"%s\": %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access sólo mostrar la lista de control de acceso a " ++"fichero\n" ++" -d, --default sólo mostrar la lista de acceso predeterminada\n" ++" --omit-header no mostrar el encabezado de comentarios\n" ++" --all-effective mostrar todos los permisos efectivos\n" ++" --no-effective mostrar los permisos no efectivos\n" ++" --skip-base ignorar archivos que sólo tienen las entradas " ++"básicas\n" ++" -R, --recursive descender recursivamente en los subdirectorios\n" ++" -L, --logical recorrido lógico, siguiendo enlaces simbólicos\n" ++" -P --physical recorrido físico, sin seguir enlaces simbólicos\n" ++" --tabular usar formato de salida tabular\n" ++" --numeric mostrar identificadores numéricos de usuario/" ++"grupo\n" ++" --absolute-names no eliminar '/' inicial en nombres de ruta\n" + +-#: ../chacl/chacl.c:309 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s: no se pudo establecer ACL predeterminado a \"%s\": %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version escribir versión y salir\n" ++" --help este texto de ayuda\n" + +-#: ../chacl/chacl.c:327 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s: falló la apertura: %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s: Entrada estándar: %s\n" + +-#: ../chacl/chacl.c:341 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s: falló la asignación de memoria: %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "Escriba `%s --help' para más información.\n" + +-#: ../setfacl/do_set.c:391 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ACL incorrecto `%s': %s en posición %d\n" + +-#: ../setfacl/do_set.c:418 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ACL predeterminado incorrecto `%s': %s en posición %d\n" + +-#: ../setfacl/do_set.c:480 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "%s: %s: Sólo los directorios pueden tener ACLs predeterminados\n" + +-#: ../setfacl/setfacl.c:151 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s: %s: No se encontró nombre de archivo en línea %d, abortando\n" + +-#: ../setfacl/setfacl.c:156 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" +-msgstr "%s: %s: No se encontró nombre de archivo en línea %d de entrada estándar, abortando\n" ++msgstr "" ++"%s: No se encontró nombre de archivo en línea %d de entrada estándar, " ++"abortando\n" + +-#: ../setfacl/setfacl.c:176 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s: %s: %s en línea %d\n" + +-#: ../setfacl/setfacl.c:200 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s: %s: No se pudo cambiar el propietario/grupo: %s\n" + +-#: ../setfacl/setfacl.c:240 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s: %s: No se pudo cambiar el propietario/grupo: %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" + msgstr "%s %s -- establecer listas de control de acceso a archivo\n" + +-#: ../setfacl/setfacl.c:242 +-#: ../setfacl/setfacl.c:692 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Uso: %s %s\n" + +-#: ../setfacl/setfacl.c:245 ++#: tools/setfacl.c:272 + #, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" +@@ -192,18 +201,19 @@ msgstr "" + " -b, --remove-all eliminar todas las entradas ACL extendidas\n" + " -k, --remove-default eliminar el ACL predeterminado\n" + +-#: ../setfacl/setfacl.c:254 ++#: tools/setfacl.c:281 + #, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" + " --set-file=file read ACL entries to set from file\n" + " --mask do recalculate the effective rights mask\n" + msgstr "" +-" --set=acl establecer ACL(s) de archivo(s), reemplazando el actual\n" ++" --set=acl establecer ACL(s) de archivo(s), reemplazando el " ++"actual\n" + " --set-file=arch leer entradas ACL a establecer desde \"arch\"\n" + " --mask recalcular la máscara de permisos efectivos\n" + +-#: ../setfacl/setfacl.c:260 ++#: tools/setfacl.c:287 + #, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" +@@ -212,7 +222,7 @@ msgstr "" + " -n, --no-mask no recalcular la máscara de derechos efectivos\n" + " -d, --default las operaciones afectal al ACL predeterminado\n" + +-#: ../setfacl/setfacl.c:265 ++#: tools/setfacl.c:292 + #, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" +@@ -227,129 +237,122 @@ msgstr "" + " --restore=file restaurar ACLs (inverso de `getfacl -R')\n" + " --test modo de prueba (los ACLs no se modifican)\n" + +-#: ../setfacl/setfacl.c:273 +-#: ../getfacl/getfacl.c:559 +-#, c-format +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version escribir versión y salir\n" +-" --help este texto de ayuda\n" +- +-#: ../setfacl/setfacl.c:358 +-#: ../getfacl/getfacl.c:768 +-#, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s: Entrada estándar: %s\n" +- +-#: ../setfacl/setfacl.c:494 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s: Opción -%c incompleta\n" + +-#: ../setfacl/setfacl.c:499 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s: Opción -%c: %s cerca del carácter %d\n" + +-#: ../setfacl/setfacl.c:575 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s: %s en línea %d de archivo %s\n" + +-#: ../setfacl/setfacl.c:583 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s: %s en línea %d de entrada estándar\n" + +-#: ../setfacl/setfacl.c:694 +-#: ../getfacl/getfacl.c:782 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "Escriba `%s --help' para más información.\n" ++msgid "Usage:\n" ++msgstr "Uso:\n" + +-#: ../getfacl/getfacl.c:463 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s: Eliminando '/' inicial en nombres de ruta absolutos\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s nombre de ruta de ACL...\n" + +-#: ../getfacl/getfacl.c:532 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- obtener listas de control de acceso a archivo\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b nombre de ruta ACL DACL...\n" + +-#: ../getfacl/getfacl.c:534 +-#: ../getfacl/getfacl.c:780 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Uso: %s [-%s] archivo ...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d nombre de ruta de ACL...\n" + +-#: ../getfacl/getfacl.c:540 ++#: tools/chacl.c:50 + #, c-format +-msgid " -d, --default display the default access control list\n" +-msgstr " -d, --default mostrar la lista de control de acceso predeterminada\n" ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R ruta...\n" + +-#: ../getfacl/getfacl.c:544 ++#: tools/chacl.c:51 + #, c-format +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access sólo mostrar la lista de control de acceso a fichero\n" +-" -d, --default sólo mostrar la lista de acceso predeterminada\n" +-" --omit-header no mostrar el encabezado de comentarios\n" +-" --all-effective mostrar todos los permisos efectivos\n" +-" --no-effective mostrar los permisos no efectivos\n" +-" --skip-base ignorar archivos que sólo tienen las entradas básicas\n" +-" -R, --recursive descender recursivamente en los subdirectorios\n" +-" -L, --logical recorrido lógico, siguiendo enlaces simbólicos\n" +-" -P --physical recorrido físico, sin seguir enlaces simbólicos\n" +-" --tabular usar formato de salida tabular\n" +-" --numeric mostrar identificadores numéricos de usuario/grupo\n" +-" --absolute-names no eliminar '/' inicial en nombres de ruta\n" ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D ruta...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Múltiples entradas del mismo tipo" ++#: tools/chacl.c:52 ++#, c-format ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B ruta...\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Entradas duplicadas" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l ruta...\t[no compatible con IRIX]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Falta una posición o es errónea" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r ruta...\t[no compatible con IRIX]\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Tipo de posición inválido" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s: error borrando ACL de acceso en \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:124 +-#: ../libacl/perm_copy_fd.c:136 +-#: ../libacl/perm_copy_fd.c:198 +-#: ../libacl/perm_copy_file.c:124 +-#: ../libacl/perm_copy_file.c:139 +-#: ../libacl/perm_copy_file.c:150 +-#: ../libacl/perm_copy_file.c:235 ++#: tools/chacl.c:153 + #, c-format +-msgid "setting permissions for %s" +-msgstr "estableciendo permisos a %s" ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s: error borrando ACL predeterminado en \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:186 +-#: ../libacl/perm_copy_file.c:199 +-#: ../libacl/perm_copy_file.c:224 ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "manteniendo permisos a %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s: ACL de acceso '%s': %s en posición %d\n" ++ ++#: tools/chacl.c:259 ++#, c-format ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s: no se pudo obtener ACL de acceso en '%s': %s\n" ++ ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s: no se pudo obtener ACL predeterminado en '%s': %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s: no se pudo obtener texto ACL de acceso en '%s': %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s: no se pudo obtener texto de ACL predeterminado en '%s': %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s: no se pudo establecer ACL de acceso en \"%s\": %s\n" + ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s: no se pudo establecer ACL predeterminado a \"%s\": %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s: falló la apertura: %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s: falló la asignación de memoria: %s\n" +diff --git a/po/fr.po b/po/fr.po +index 15ac1ef..a5fe3e3 100644 +--- a/po/fr.po ++++ b/po/fr.po +@@ -1,7 +1,7 @@ + # Français translation of Acl. + # Copyright (C) 2005 Free Software Foundation, Inc. + # Sylvain Archenault , 2005. +-# ++# + # This program is free software: you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 2 of the License, or +@@ -18,167 +18,175 @@ + msgid "" + msgstr "" + "Project-Id-Version: Acl\n" +-"Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2005-09-20 21:50+0200\n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2005-09-24 15:46+0200\n" + "Last-Translator: Sylvain Archenault \n" + "Language-Team: french \n" ++"Language: fr\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=iso-8859-15\n" + "Content-Transfer-Encoding: 8bit\n" +-"Plural-Forms: " +- +-#: ../chacl/chacl.c:59 +-msgid "Usage:\n" +-msgstr "Utilisation :\n" ++"Plural-Forms: \n" + +-#: ../chacl/chacl.c:60 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s répertoire acl...\n" ++msgid "setting permissions for %s" ++msgstr "modifier les permissions pour %s" + +-#: ../chacl/chacl.c:61 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b acl dacl répertoire...\n" ++msgid "preserving permissions for %s" ++msgstr "conserver les permissions pour %s" + +-#: ../chacl/chacl.c:62 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d dacl répertoire...\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Plusieurs entrées de même type" + +-#: ../chacl/chacl.c:63 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R répertoire...\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Entrées dupliquées" + +-#: ../chacl/chacl.c:64 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D répertoire...\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Entrée erronée ou manquante" + +-#: ../chacl/chacl.c:65 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B répertoire...\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Type d'entrée non valable" + +-#: ../chacl/chacl.c:66 ++#: tools/getfacl.c:488 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l répertoire...\t[pas compatible IRIX]\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s : suppression du premier « / » des noms de chemins absolus\n" + +-#: ../chacl/chacl.c:68 ++#: tools/getfacl.c:559 + #, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r répertoire...\t[pas compatible IRIX]\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- obtenir les listes de contrôle d'accès du fichier\n" + +-#: ../chacl/chacl.c:159 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s : erreur de suppression de l'accès acl de « %s » : %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Utilisation : %s [-%s] fichier...\n" + +-#: ../chacl/chacl.c:166 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" ++msgid " -d, --default display the default access control list\n" + msgstr "" +-"%s : erreur de suppression de l'accès acl par défaut de « %s » : %s\n" +- +-#: ../chacl/chacl.c:185 ../chacl/chacl.c:204 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s : accès ACL « %s » : %s à l'entrée %d\n" +- +-#: ../chacl/chacl.c:272 +-#, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s : impossible d'obtenir l'accès ACL de « %s » : %s\n" +- +-#: ../chacl/chacl.c:278 +-#, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s : impossible d'obtenir l'accès ACL par défaut de « %s » : %s\n" +- +-#: ../chacl/chacl.c:284 +-#, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s : impossible d'obtenir l'accès texte ACL de « %s » : %s\n" +- +-#: ../chacl/chacl.c:291 +-#, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s : impossible d'obtenir le texte ACL par défaut de « %s » : %s\n" ++"-d, --default afficher la liste de contrôle d'accès par défaut\n" + +-#: ../chacl/chacl.c:317 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s : impossible de modifier l'accès ACL de « %s »: %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access affiche seulement le fichier ACL\n" ++" -d, --default affiche seulement le fichier ACL par défaut\n" ++" --omit-header n'affiche pas les commentaires d'en-tête\n" ++" --all-effective affiche tous les droits en vigueur\n" ++" --no-effective affiche les droits inactifs\n" ++" --skip-base ignorer les fichiers qui ont seulement les " ++"entrées\n" ++" de base\n" ++" -R, --recursive parcourir récursivement les sous-répertoires\n" ++" -L, --logical suivre les liens symboliques\n" ++" -P, --physical ne pas suivre les liens symboliques\n" ++" --tabular sortie tabulée\n" ++" --numeric afficher les identifiants numériques des\n" ++" utilisateurs/groupes\n" ++" --absolute-names ne pas enlever le premier « / » dans les chemins\n" + +-#: ../chacl/chacl.c:323 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s : impossible de définir l'ACL par défaut de « %s » : %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version afficher la version et quitter\n" ++" --help afficher ce message d'aide\n" + +-#: ../chacl/chacl.c:341 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s : échec d'opendir : %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s : Sortie standard : %s\n" + +-#: ../chacl/chacl.c:355 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s : échec de malloc : %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "Essayer « %s --help » pour plus d'informations.\n" + +-#: ../setfacl/do_set.c:404 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s : %s : ACL d'accès mal formulé « %s » : %s à l'entrée %d\n" + +-#: ../setfacl/do_set.c:431 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "" + "%s : %s : entrée ACL par défaut mal formulée « %s » : %s à l'entrée·%d\n" + +-#: ../setfacl/do_set.c:494 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "" + "%s : %s : seuls les répertoires peuvent avoir une entrée ACL par défaut\n" + +-#: ../setfacl/setfacl.c:151 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s : %s : nom de fichier manquant à la ligne %d, annulation\n" + +-#: ../setfacl/setfacl.c:156 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" + msgstr "" + "%s : nom de fichier manquant à la ligne %d de la sortie standard, " + "annulation\n" + +-#: ../setfacl/setfacl.c:177 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s : %s : %s à la ligne %d\n" + +-#: ../setfacl/setfacl.c:201 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s : %s : impossible de changer de propriétaire/groupe : %s\n" + +-#: ../setfacl/setfacl.c:241 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s : %s : impossible de changer de propriétaire/groupe : %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" +-msgstr "" +-"%s %s -- définir les listes de contrôle d'accès des fichiers (ACL)\n" ++msgstr "%s %s -- définir les listes de contrôle d'accès des fichiers (ACL)\n" + +-#: ../setfacl/setfacl.c:243 ../setfacl/setfacl.c:701 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Utilisation : %s %s\n" + +-#: ../setfacl/setfacl.c:246 ++#: tools/setfacl.c:272 ++#, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" + " -M, --modify-file=file read ACL entries to modify from file\n" +@@ -194,10 +202,11 @@ msgstr "" + " -b, --remove-all supprimer toutes les entrées ACL étendues\n" + " -k, --remove-default supprimer l'ACL par défaut\n" + +-#: ../setfacl/setfacl.c:255 ++#: tools/setfacl.c:281 ++#, fuzzy, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" +-" --set-file=fichier read ACL entries to set from file\n" ++" --set-file=file read ACL entries to set from file\n" + " --mask do recalculate the effective rights mask\n" + msgstr "" + " --set=acl définir l'ACL des fichier(s) en remplaçant l'ACL\n" +@@ -205,15 +214,18 @@ msgstr "" + " --set-file=fichier lire les entrées ACL à modifier du fichier\n" + " --mask recalculer les masques des droits en vigueur\n" + +-#: ../setfacl/setfacl.c:261 ++#: tools/setfacl.c:287 ++#, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" + " -d, --default operations apply to the default ACL\n" + msgstr "" +-" -n, --no-mask ne pas recalculer les masques de droits en vigueur\n" ++" -n, --no-mask ne pas recalculer les masques de droits en " ++"vigueur\n" + " -d, --default les opérations s'appliquent à l'ACL par défaut\n" + +-#: ../setfacl/setfacl.c:266 ++#: tools/setfacl.c:292 ++#, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" + " -L, --logical logical walk, follow symbolic links\n" +@@ -227,122 +239,122 @@ msgstr "" + " --restore=fichier restaurer les ACL (inverse de « getfacl -R »)\n" + " --test mode test (les ACL ne sont pas modifiés)\n" + +-#: ../setfacl/setfacl.c:274 ../getfacl/getfacl.c:558 +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version afficher la version et quitter\n" +-" --help afficher ce message d'aide\n" +- +-#: ../setfacl/setfacl.c:493 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s : Option -%c incomplète\n" + +-#: ../setfacl/setfacl.c:498 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s : Option -%c : %s près du caractère %d\n" + +-#: ../setfacl/setfacl.c:584 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s : %s à la ligne %d du fichier %s\n" + +-#: ../setfacl/setfacl.c:592 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s : %s à la ligne %d de la sortie standard\n" + +-#: ../setfacl/setfacl.c:703 ../getfacl/getfacl.c:774 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "Essayer « %s --help » pour plus d'informations.\n" ++msgid "Usage:\n" ++msgstr "Utilisation :\n" + +-#: ../getfacl/getfacl.c:462 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s : suppression du premier « / » des noms de chemins absolus\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s répertoire acl...\n" + +-#: ../getfacl/getfacl.c:531 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- obtenir les listes de contrôle d'accès du fichier\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b acl dacl répertoire...\n" + +-#: ../getfacl/getfacl.c:533 ../getfacl/getfacl.c:772 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Utilisation : %s [-%s] fichier...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d dacl répertoire...\n" + +-#: ../getfacl/getfacl.c:539 +-msgid " -d, --default display the default access control list\n" +-msgstr "" +-"-d, --default afficher la liste de contrôle d'accès par défaut\n" ++#: tools/chacl.c:50 ++#, c-format ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R répertoire...\n" + +-#: ../getfacl/getfacl.c:543 +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access affiche seulement le fichier ACL\n" +-" -d, --default affiche seulement le fichier ACL par défaut\n" +-" --omit-header n'affiche pas les commentaires d'en-tête\n" +-" --all-effective affiche tous les droits en vigueur\n" +-" --no-effective affiche les droits inactifs\n" +-" --skip-base ignorer les fichiers qui ont seulement les entrées\n" +-" de base\n" +-" -R, --recursive parcourir récursivement les sous-répertoires\n" +-" -L, --logical suivre les liens symboliques\n" +-" -P, --physical ne pas suivre les liens symboliques\n" +-" --tabular sortie tabulée\n" +-" --numeric afficher les identifiants numériques des\n" +-" utilisateurs/groupes\n" +-" --absolute-names ne pas enlever le premier « / » dans les chemins\n" ++#: tools/chacl.c:51 ++#, c-format ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D répertoire...\n" + +-#: ../getfacl/getfacl.c:760 ++#: tools/chacl.c:52 + #, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s : Sortie standard : %s\n" ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B répertoire...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Plusieurs entrées de même type" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l répertoire...\t[pas compatible IRIX]\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Entrées dupliquées" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r répertoire...\t[pas compatible IRIX]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Entrée erronée ou manquante" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s : erreur de suppression de l'accès acl de « %s » : %s\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Type d'entrée non valable" ++#: tools/chacl.c:153 ++#, c-format ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s : erreur de suppression de l'accès acl par défaut de « %s » : %s\n" + +-#: ../libacl/perm_copy_fd.c:123 ../libacl/perm_copy_fd.c:135 +-#: ../libacl/perm_copy_fd.c:197 ../libacl/perm_copy_file.c:123 +-#: ../libacl/perm_copy_file.c:138 ../libacl/perm_copy_file.c:149 +-#: ../libacl/perm_copy_file.c:234 ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "setting permissions for %s" +-msgstr "modifier les permissions pour %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s : accès ACL « %s » : %s à l'entrée %d\n" + +-#: ../libacl/perm_copy_fd.c:185 ../libacl/perm_copy_file.c:198 +-#: ../libacl/perm_copy_file.c:223 ++#: tools/chacl.c:259 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "conserver les permissions pour %s" ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s : impossible d'obtenir l'accès ACL de « %s » : %s\n" + ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s : impossible d'obtenir l'accès ACL par défaut de « %s » : %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s : impossible d'obtenir l'accès texte ACL de « %s » : %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s : impossible d'obtenir le texte ACL par défaut de « %s » : %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s : impossible de modifier l'accès ACL de « %s »: %s\n" + ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s : impossible de définir l'ACL par défaut de « %s » : %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s : échec d'opendir : %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s : échec de malloc : %s\n" +diff --git a/po/gl.po b/po/gl.po +index ae7b700..ec6b956 100644 +--- a/po/gl.po ++++ b/po/gl.po +@@ -18,164 +18,172 @@ + msgid "" + msgstr "" + "Project-Id-Version: acl-2.2.43.1\n" +-"Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2007-03-06 12:08+0100\n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2007-03-16 18:52+0100\n" + "Last-Translator: Antonio Trueba \n" + "Language-Team: Galician\n" ++"Language: gl\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=utf-8\n" + "Content-Transfer-Encoding: 8bit\n" + "X-Poedit-Language: Galician\n" + +-#: ../chacl/chacl.c:45 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "Usage:\n" +-msgstr "Uso:\n" +- +-#: ../chacl/chacl.c:46 +-#, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s nome de rota do ACL...\n" +- +-#: ../chacl/chacl.c:47 +-#, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b nome de ruta ACL DACL..\n" +- +-#: ../chacl/chacl.c:48 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d rota ó ACL...\n" +- +-#: ../chacl/chacl.c:49 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R rota...\n" +- +-#: ../chacl/chacl.c:50 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D rota...\n" +- +-#: ../chacl/chacl.c:51 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B rota...\n" ++msgid "setting permissions for %s" ++msgstr "establecendo permisos para %s" + +-#: ../chacl/chacl.c:52 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l rota...\t[non compatible con IRIX]\n" ++msgid "preserving permissions for %s" ++msgstr "mantendo permisos de %s" + +-#: ../chacl/chacl.c:54 +-#, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r rota...\t[non compatible con IRIX]\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Varias entradas do mesmo tipo" + +-#: ../chacl/chacl.c:145 +-#, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s: erro borrando ACL de acceso en \"%s\": %s\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Entradas duplicadas" + +-#: ../chacl/chacl.c:152 +-#, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" +-msgstr "%s: erro borrando ACL predeterminado en \"%s\": %s\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Falta un atributo, ou está mal formado" + +-#: ../chacl/chacl.c:171 +-#: ../chacl/chacl.c:190 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s: ACL de acceso '%s': %s en posición %d\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Tipo de entrada non válido" + +-#: ../chacl/chacl.c:258 ++#: tools/getfacl.c:488 + #, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s: non se puido obter ACL de acceso en '%s': %s\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s: Eliminando '/' iniciais en nomes de ruta absolutos\n" + +-#: ../chacl/chacl.c:264 ++#: tools/getfacl.c:559 + #, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s: non se puido obter ACL predeterminado en '%s': %s\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- obter listas de control de acceso a ficheiro\n" + +-#: ../chacl/chacl.c:270 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s: non se puido obter texto ACL de acceso en '%s': %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Uso: %s [-%s] ficheiro ...\n" + +-#: ../chacl/chacl.c:277 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s: non se puido obter texto de ACL predeterminado en '%s': %s\n" ++msgid " -d, --default display the default access control list\n" ++msgstr "" ++" -d, --default amosá-la lista de control de acceso " ++"predeterminada\n" + +-#: ../chacl/chacl.c:303 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s: non se puido establecé-lo ACL de acceso en \"%s\": %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access só amosá-la lista de control de acceso ó ficheiro\n" ++" -d, --default só mostrá-la lista de control de acceso " ++"predeterminada\n" ++" --omit-header non amosá-lo comentario de encabezamento\n" ++" --all-effective amosar tódolos dereitos efectivos\n" ++" --no-effective non amosar ningún dereito efectivo\n" ++" --skip-base saltar ficheiros que só teñan as entradas básicas\n" ++" -R, --recursive descender recursivamente nos subdirectorios\n" ++" -L, --logical percorrido lóxico, seguindo enlaces simbólicos\n" ++" -P --physical percorrido físico, non seguir enlaces simbólicos\n" ++" --tabular usar formato de saída tabular\n" ++" --numeric amosar identificadores numéricos de propietario/" ++"grupo\n" ++" --absolute-names non eliminá-la '/' en nomes de ruta\n" + +-#: ../chacl/chacl.c:309 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s: non se puido establecé-lo ACL predeterminado en \"%s\": %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version amosar versión e sair\n" ++" --help este texto de axuda\n" + +-#: ../chacl/chacl.c:327 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s: a chamada a opendir fallou: %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s: Entrada estándar: %s\n" + +-#: ../chacl/chacl.c:341 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s: a chamada a malloc fallou: %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "Escriba \"%s --help\" para máis información.\n" + +-#: ../setfacl/do_set.c:391 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ACL incorrecto `%s': %s na posición %d\n" + +-#: ../setfacl/do_set.c:418 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ACL predeterminado incorrecto `%s': %s na posición %d\n" + +-#: ../setfacl/do_set.c:480 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "%s: %s: Só os directorios poden ter ACLs predeterminados\n" + +-#: ../setfacl/setfacl.c:151 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s: %s: Non se atopou nome de ficheiro na liña %d, abortando\n" + +-#: ../setfacl/setfacl.c:156 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" +-msgstr "%s: Non se atopou nome de ficheiro na liña %d da entrada estándar, abortando\n" ++msgstr "" ++"%s: Non se atopou nome de ficheiro na liña %d da entrada estándar, " ++"abortando\n" + +-#: ../setfacl/setfacl.c:176 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s: %s: %s na liña %d\n" + +-#: ../setfacl/setfacl.c:200 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s: %s: Non se pode cambiá-lo propietario/grupo: %s\n" + +-#: ../setfacl/setfacl.c:240 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s: %s: Non se pode cambiá-lo propietario/grupo: %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" + msgstr "%s %s -- establecer listas de control de acceso a ficheiro\n" + +-#: ../setfacl/setfacl.c:242 +-#: ../setfacl/setfacl.c:692 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Uso: %s %s\n" + +-#: ../setfacl/setfacl.c:245 ++#: tools/setfacl.c:272 + #, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" +@@ -192,18 +200,19 @@ msgstr "" + " -b, --remove-all borrar tódalas entradas de ACL extendidas\n" + " -k, --remove-default borrar ó ACL predeterminado\n" + +-#: ../setfacl/setfacl.c:254 ++#: tools/setfacl.c:281 + #, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" + " --set-file=file read ACL entries to set from file\n" + " --mask do recalculate the effective rights mask\n" + msgstr "" +-" --set=ACL estableceé-lo ACL de ficheiro(s), substituindo ó ACL actual\n" ++" --set=ACL estableceé-lo ACL de ficheiro(s), substituindo ó " ++"ACL actual\n" + " --set-file=fich ler entradas ACL a establecer dende ficheiro\n" + " --mask recalculá-la máscara de dereitos efectiva\n" + +-#: ../setfacl/setfacl.c:260 ++#: tools/setfacl.c:287 + #, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" +@@ -212,7 +221,7 @@ msgstr "" + " -n, --no-mask non recalculá-la máscara de dereitos efectiva\n" + " -d, --default as operacións afectan ó ACL predeterminado\n" + +-#: ../setfacl/setfacl.c:265 ++#: tools/setfacl.c:292 + #, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" +@@ -227,129 +236,122 @@ msgstr "" + " --restore=fich restaurar ACLs (inverso de 'getfacl -R')\n" + " --test modo de proba (os ACLs non son modificados)\n" + +-#: ../setfacl/setfacl.c:273 +-#: ../getfacl/getfacl.c:559 +-#, c-format +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version amosar versión e sair\n" +-" --help este texto de axuda\n" +- +-#: ../setfacl/setfacl.c:358 +-#: ../getfacl/getfacl.c:768 +-#, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s: Entrada estándar: %s\n" +- +-#: ../setfacl/setfacl.c:494 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s: Opción -%c incompleta\n" + +-#: ../setfacl/setfacl.c:499 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s: Opción -%c: %s preto do carácter %d\n" + +-#: ../setfacl/setfacl.c:575 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s: %s na liña %d do ficheiro %s\n" + +-#: ../setfacl/setfacl.c:583 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s: %s na liña %d da entrada estándar\n" + +-#: ../setfacl/setfacl.c:694 +-#: ../getfacl/getfacl.c:782 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "Escriba \"%s --help\" para máis información.\n" ++msgid "Usage:\n" ++msgstr "Uso:\n" + +-#: ../getfacl/getfacl.c:463 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s: Eliminando '/' iniciais en nomes de ruta absolutos\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s nome de rota do ACL...\n" + +-#: ../getfacl/getfacl.c:532 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- obter listas de control de acceso a ficheiro\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b nome de ruta ACL DACL..\n" + +-#: ../getfacl/getfacl.c:534 +-#: ../getfacl/getfacl.c:780 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Uso: %s [-%s] ficheiro ...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d rota ó ACL...\n" + +-#: ../getfacl/getfacl.c:540 ++#: tools/chacl.c:50 + #, c-format +-msgid " -d, --default display the default access control list\n" +-msgstr " -d, --default amosá-la lista de control de acceso predeterminada\n" ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R rota...\n" + +-#: ../getfacl/getfacl.c:544 ++#: tools/chacl.c:51 + #, c-format +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access só amosá-la lista de control de acceso ó ficheiro\n" +-" -d, --default só mostrá-la lista de control de acceso predeterminada\n" +-" --omit-header non amosá-lo comentario de encabezamento\n" +-" --all-effective amosar tódolos dereitos efectivos\n" +-" --no-effective non amosar ningún dereito efectivo\n" +-" --skip-base saltar ficheiros que só teñan as entradas básicas\n" +-" -R, --recursive descender recursivamente nos subdirectorios\n" +-" -L, --logical percorrido lóxico, seguindo enlaces simbólicos\n" +-" -P --physical percorrido físico, non seguir enlaces simbólicos\n" +-" --tabular usar formato de saída tabular\n" +-" --numeric amosar identificadores numéricos de propietario/grupo\n" +-" --absolute-names non eliminá-la '/' en nomes de ruta\n" ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D rota...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Varias entradas do mesmo tipo" ++#: tools/chacl.c:52 ++#, c-format ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B rota...\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Entradas duplicadas" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l rota...\t[non compatible con IRIX]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Falta un atributo, ou está mal formado" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r rota...\t[non compatible con IRIX]\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Tipo de entrada non válido" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s: erro borrando ACL de acceso en \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:124 +-#: ../libacl/perm_copy_fd.c:136 +-#: ../libacl/perm_copy_fd.c:198 +-#: ../libacl/perm_copy_file.c:124 +-#: ../libacl/perm_copy_file.c:139 +-#: ../libacl/perm_copy_file.c:150 +-#: ../libacl/perm_copy_file.c:235 ++#: tools/chacl.c:153 + #, c-format +-msgid "setting permissions for %s" +-msgstr "establecendo permisos para %s" ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s: erro borrando ACL predeterminado en \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:186 +-#: ../libacl/perm_copy_file.c:199 +-#: ../libacl/perm_copy_file.c:224 ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "mantendo permisos de %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s: ACL de acceso '%s': %s en posición %d\n" ++ ++#: tools/chacl.c:259 ++#, c-format ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s: non se puido obter ACL de acceso en '%s': %s\n" ++ ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s: non se puido obter ACL predeterminado en '%s': %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s: non se puido obter texto ACL de acceso en '%s': %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s: non se puido obter texto de ACL predeterminado en '%s': %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s: non se puido establecé-lo ACL de acceso en \"%s\": %s\n" + ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s: non se puido establecé-lo ACL predeterminado en \"%s\": %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s: a chamada a opendir fallou: %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s: a chamada a malloc fallou: %s\n" +diff --git a/po/pl.po b/po/pl.po +index 186507a..00a6c77 100644 +--- a/po/pl.po ++++ b/po/pl.po +@@ -18,160 +18,174 @@ + msgid "" + msgstr "" + "Project-Id-Version: acl-2.2.22\n" +-"POT-Creation-Date: 2004-01-28 22:30+0100\n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2004-01-28 22:31+0100\n" + "Last-Translator: Jakub Bogusz \n" + "Language-Team: Polish \n" ++"Language: pl\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=ISO-8859-2\n" + "Content-Transfer-Encoding: 8bit\n" + +-#: ../chacl/chacl.c:59 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "Usage:\n" +-msgstr "Sk³adnia:\n" +- +-#: ../chacl/chacl.c:60 +-#, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s acl ¶cie¿ka...\n" +- +-#: ../chacl/chacl.c:61 +-#, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b acl dacl ¶cie¿ka...\n" +- +-#: ../chacl/chacl.c:62 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d dacl ¶cie¿ka...\n" +- +-#: ../chacl/chacl.c:63 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R ¶cie¿ka...\n" +- +-#: ../chacl/chacl.c:64 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D ¶cie¿ka...\n" +- +-#: ../chacl/chacl.c:65 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B ¶cie¿ka...\n" ++msgid "setting permissions for %s" ++msgstr "ustawianie uprawnieñ dla %s" + +-#: ../chacl/chacl.c:66 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l ¶cie¿ka...\t[niekompatybilne z IRIX-em]\n" ++msgid "preserving permissions for %s" ++msgstr "zachowywanie uprawnieñ dla %s" + +-#: ../chacl/chacl.c:68 +-#, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r ¶cie¿ka...\t[niekompatybilne z IRIX-em]\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Wiele pozycji tego samego typu" + +-#: ../chacl/chacl.c:159 +-#, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s: b³±d przy usuwaniu dostêpowego acl dla \"%s\": %s\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Powtórzone pozycje" + +-#: ../chacl/chacl.c:166 +-#, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" +-msgstr "%s: b³±d przy usuwaniu domy¶lnego acl dla \"%s\": %s\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Brakuj±ca lub b³êdna pozycja" + +-#: ../chacl/chacl.c:185 ../chacl/chacl.c:204 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s: dostêpowe ACL '%s': %s na pozycji %d\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Nieprawid³owy typ pozycji" + +-#: ../chacl/chacl.c:272 ++#: tools/getfacl.c:488 + #, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s: nie mo¿na odczytaæ dostêpowego ACL dla '%s': %s\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s: Usuniêcie wiod±cego '/' ze ¶cie¿ek bezwzglêdnych\n" + +-#: ../chacl/chacl.c:278 ++#: tools/getfacl.c:559 + #, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s: nie mo¿na odczytaæ domy¶lnego ACL dla '%s': %s\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- odczyt list kontroli dostêpu do plików (ACL-i)\n" + +-#: ../chacl/chacl.c:284 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s: nie mo¿na odczytaæ dostêpowego tekstu ACL dla '%s': %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Sk³adnia: %s [-%s] plik ...\n" + +-#: ../chacl/chacl.c:291 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s: nie mo¿na odczytaæ domy¶lnego tekstu ACL dla '%s': %s\n" ++msgid " -d, --default display the default access control list\n" ++msgstr "" ++" -d, --default wy¶wietlenie domy¶lnej listy kontroli dostêpu\n" + +-#: ../chacl/chacl.c:317 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s: nie mo¿na ustawiæ dostêpowego acl dla \"%s\": %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access wy¶wietlenie tylko listy kontroli dostêpu do " ++"pliku\n" ++" -d, --default wy¶wietlenie tylko domy¶lnej listy kontroli " ++"dostêpu\n" ++" --omit-header nie wy¶wietlanie nag³ówka z komentarzem\n" ++" --all-effective wy¶wietlanie wszystkich efektywnych uprawnieñ\n" ++" --no-effective nie wy¶wietlanie efektywnych uprawnieñ\n" ++" --skip-base pominiêcie plików z sam± podstawow± pozycj±\n" ++" -R, --recursive rekurencyjne wchodzenie do katalogów\n" ++" -L, --logical przechodzenie logiczne, pod±¿anie za dowi±zaniami\n" ++" symbolicznymi\n" ++" -P, --physical przechodzenie fizyczne, nie pod±¿anie za " ++"dowi±zaniami\n" ++" symbolicznymi\n" ++" --tabular wyj¶cie w formacie tabeli\n" ++" --numeric wy¶wietlanie liczbowych identyfikatorów\n" ++" u¿ytkowników/grup\n" ++" --absolute-names nie usuwanie wiod±cego '/' z nazw plików\n" + +-#: ../chacl/chacl.c:323 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s: nie mo¿na ustawiæ domy¶lnego acl dla \"%s\": %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version wy¶wietlenie informacji o wersji i zakoñczenie\n" ++" --help ten tekst pomocy\n" + +-#: ../chacl/chacl.c:341 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s: opendir nie powiod³o siê: %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s: Standardowe wej¶cie: %s\n" + +-#: ../chacl/chacl.c:355 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s: malloc nie powiód³ siê: %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "`%s --help' wy¶wietli wiêcej informacji.\n" + +-#: ../setfacl/do_set.c:404 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ¬le sformu³owane dostêpowe ACL `%s': %s na pozycji %d\n" + +-#: ../setfacl/do_set.c:431 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "%s: %s: ¬le sformu³owane domy¶lne ACL `%s': %s na pozycji %d\n" + +-#: ../setfacl/do_set.c:494 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "%s: %s: Tylko katalogi mog± mieæ domy¶lne ACL-e\n" + +-#: ../setfacl/setfacl.c:151 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s: %s: Nie znaleziono nazwy pliku w linii %d, przerwanie pracy\n" + +-#: ../setfacl/setfacl.c:156 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" +-msgstr "%s: Nie znaleziono nazwy pliku w linii %d standardowego wej¶cia, przerwanie pracy\n" ++msgstr "" ++"%s: Nie znaleziono nazwy pliku w linii %d standardowego wej¶cia, przerwanie " ++"pracy\n" + +-#: ../setfacl/setfacl.c:177 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s: %s: %s w linii %d\n" + +-#: ../setfacl/setfacl.c:201 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s: %s: Nie mo¿na zmieniæ w³a¶ciciela/grupy: %s\n" + +-#: ../setfacl/setfacl.c:241 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s: %s: Nie mo¿na zmieniæ w³a¶ciciela/grupy: %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" + msgstr "%s %s -- ustawianie list kontroli dostêpu do plików (ACL-i)\n" + +-#: ../setfacl/setfacl.c:243 ../setfacl/setfacl.c:701 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Sk³adnia: %s %s\n" + +-#: ../setfacl/setfacl.c:246 ++#: tools/setfacl.c:272 + #, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" +@@ -188,7 +202,7 @@ msgstr "" + " -b, --remove-all usuniêcie wszystkich rozszerzonych pozycji ACL\n" + " -k, --remove-default usuniêcie domy¶lnego ACL\n" + +-#: ../setfacl/setfacl.c:255 ++#: tools/setfacl.c:281 + #, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" +@@ -199,7 +213,7 @@ msgstr "" + " --set-file=plik odczytanie z pliku pozycji ACL do ustawienia\n" + " --mask przeliczenie maski efektywnych uprawnieñ\n" + +-#: ../setfacl/setfacl.c:261 ++#: tools/setfacl.c:287 + #, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" +@@ -208,7 +222,7 @@ msgstr "" + " -n, --no-mask nie przeliczanie maski efektywnych uprawnieñ\n" + " -d, --default wykonywanie operacji na domy¶lnym ACL\n" + +-#: ../setfacl/setfacl.c:266 ++#: tools/setfacl.c:292 + #, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" +@@ -220,128 +234,128 @@ msgstr "" + " -R, --recursive rekurencyjne wchodzenie do katalogów\n" + " -L, --logical przechodzenie logiczne, pod±¿anie za dowi±zaniami\n" + " symbolicznymi\n" +-" -P, --physical przechodzenie fizyczne, nie pod±¿anie za dowi±zaniami\n" ++" -P, --physical przechodzenie fizyczne, nie pod±¿anie za " ++"dowi±zaniami\n" + " symbolicznymi\n" + " --restore=plik odtworzenie ACL-i (odwrotno¶æ `getfacl -R')\n" + " --test tryb testowy (ACL-e nie s± modyfikowane)\n" + +-#: ../setfacl/setfacl.c:274 ../getfacl/getfacl.c:558 +-#, c-format +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version wy¶wietlenie informacji o wersji i zakoñczenie\n" +-" --help ten tekst pomocy\n" +- +-#: ../setfacl/setfacl.c:493 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s: Opcja -%c niekompletna\n" + +-#: ../setfacl/setfacl.c:498 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s: Opcja -%c: %s obok znaku %d\n" + +-#: ../setfacl/setfacl.c:584 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s: %s w linii %d pliku %s\n" + +-#: ../setfacl/setfacl.c:592 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s: %s w linii %d standardowego wej¶cia\n" + +-#: ../setfacl/setfacl.c:703 ../getfacl/getfacl.c:774 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "`%s --help' wy¶wietli wiêcej informacji.\n" ++msgid "Usage:\n" ++msgstr "Sk³adnia:\n" + +-#: ../getfacl/getfacl.c:462 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s: Usuniêcie wiod±cego '/' ze ¶cie¿ek bezwzglêdnych\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s acl ¶cie¿ka...\n" + +-#: ../getfacl/getfacl.c:531 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- odczyt list kontroli dostêpu do plików (ACL-i)\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b acl dacl ¶cie¿ka...\n" + +-#: ../getfacl/getfacl.c:533 ../getfacl/getfacl.c:772 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Sk³adnia: %s [-%s] plik ...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d dacl ¶cie¿ka...\n" + +-#: ../getfacl/getfacl.c:539 ++#: tools/chacl.c:50 + #, c-format +-msgid " -d, --default display the default access control list\n" +-msgstr " -d, --default wy¶wietlenie domy¶lnej listy kontroli dostêpu\n" ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R ¶cie¿ka...\n" + +-#: ../getfacl/getfacl.c:543 ++#: tools/chacl.c:51 + #, c-format +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access wy¶wietlenie tylko listy kontroli dostêpu do pliku\n" +-" -d, --default wy¶wietlenie tylko domy¶lnej listy kontroli dostêpu\n" +-" --omit-header nie wy¶wietlanie nag³ówka z komentarzem\n" +-" --all-effective wy¶wietlanie wszystkich efektywnych uprawnieñ\n" +-" --no-effective nie wy¶wietlanie efektywnych uprawnieñ\n" +-" --skip-base pominiêcie plików z sam± podstawow± pozycj±\n" +-" -R, --recursive rekurencyjne wchodzenie do katalogów\n" +-" -L, --logical przechodzenie logiczne, pod±¿anie za dowi±zaniami\n" +-" symbolicznymi\n" +-" -P, --physical przechodzenie fizyczne, nie pod±¿anie za dowi±zaniami\n" +-" symbolicznymi\n" +-" --tabular wyj¶cie w formacie tabeli\n" +-" --numeric wy¶wietlanie liczbowych identyfikatorów\n" +-" u¿ytkowników/grup\n" +-" --absolute-names nie usuwanie wiod±cego '/' z nazw plików\n" ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D ¶cie¿ka...\n" + +-#: ../getfacl/getfacl.c:760 ++#: tools/chacl.c:52 + #, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s: Standardowe wej¶cie: %s\n" ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B ¶cie¿ka...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Wiele pozycji tego samego typu" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l ¶cie¿ka...\t[niekompatybilne z IRIX-em]\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Powtórzone pozycje" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r ¶cie¿ka...\t[niekompatybilne z IRIX-em]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Brakuj±ca lub b³êdna pozycja" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s: b³±d przy usuwaniu dostêpowego acl dla \"%s\": %s\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Nieprawid³owy typ pozycji" ++#: tools/chacl.c:153 ++#, c-format ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s: b³±d przy usuwaniu domy¶lnego acl dla \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:123 ../libacl/perm_copy_fd.c:135 +-#: ../libacl/perm_copy_fd.c:197 ../libacl/perm_copy_file.c:123 +-#: ../libacl/perm_copy_file.c:138 ../libacl/perm_copy_file.c:149 +-#: ../libacl/perm_copy_file.c:234 ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "setting permissions for %s" +-msgstr "ustawianie uprawnieñ dla %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s: dostêpowe ACL '%s': %s na pozycji %d\n" + +-#: ../libacl/perm_copy_fd.c:185 ../libacl/perm_copy_file.c:198 +-#: ../libacl/perm_copy_file.c:223 ++#: tools/chacl.c:259 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "zachowywanie uprawnieñ dla %s" ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s: nie mo¿na odczytaæ dostêpowego ACL dla '%s': %s\n" ++ ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s: nie mo¿na odczytaæ domy¶lnego ACL dla '%s': %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s: nie mo¿na odczytaæ dostêpowego tekstu ACL dla '%s': %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s: nie mo¿na odczytaæ domy¶lnego tekstu ACL dla '%s': %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s: nie mo¿na ustawiæ dostêpowego acl dla \"%s\": %s\n" ++ ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s: nie mo¿na ustawiæ domy¶lnego acl dla \"%s\": %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s: opendir nie powiod³o siê: %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s: malloc nie powiód³ siê: %s\n" +diff --git a/po/sv.po b/po/sv.po +index 2348eca..0fa683b 100644 +--- a/po/sv.po ++++ b/po/sv.po +@@ -18,162 +18,167 @@ + msgid "" + msgstr "" + "Project-Id-Version: acl 2.2.37\n" +-"POT-Creation-Date: \n" ++"Report-Msgid-Bugs-To: acl-devel@nongnu.org\n" ++"POT-Creation-Date: 2014-01-10 09:16-0500\n" + "PO-Revision-Date: 2006-05-23 22:45+0100\n" + "Last-Translator: Daniel Nylander \n" + "Language-Team: Swedish \n" ++"Language: sv\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Transfer-Encoding: 8bit\n" + +-#: ../chacl/chacl.c:59 +-msgid "Usage:\n" +-msgstr "Användning:\n" +- +-#: ../chacl/chacl.c:60 +-#, c-format +-msgid "\t%s acl pathname...\n" +-msgstr "\t%s acl sökväg...\n" +- +-#: ../chacl/chacl.c:61 ++#: libacl/perm_copy_file.c:124 libacl/perm_copy_file.c:139 ++#: libacl/perm_copy_file.c:150 libacl/perm_copy_file.c:235 ++#: libacl/perm_copy_fd.c:124 libacl/perm_copy_fd.c:136 ++#: libacl/perm_copy_fd.c:198 + #, c-format +-msgid "\t%s -b acl dacl pathname...\n" +-msgstr "\t%s -b acl dacl sökväg...\n" +- +-#: ../chacl/chacl.c:62 +-#, c-format +-msgid "\t%s -d dacl pathname...\n" +-msgstr "\t%s -d dacl sökväg...\n" +- +-#: ../chacl/chacl.c:63 +-#, c-format +-msgid "\t%s -R pathname...\n" +-msgstr "\t%s -R sökväg...\n" +- +-#: ../chacl/chacl.c:64 +-#, c-format +-msgid "\t%s -D pathname...\n" +-msgstr "\t%s -D sökväg...\n" +- +-#: ../chacl/chacl.c:65 +-#, c-format +-msgid "\t%s -B pathname...\n" +-msgstr "\t%s -B sökväg...\n" ++msgid "setting permissions for %s" ++msgstr "ställer in rättigheter för %s" + +-#: ../chacl/chacl.c:66 ++#: libacl/perm_copy_file.c:199 libacl/perm_copy_file.c:224 ++#: libacl/perm_copy_fd.c:186 + #, c-format +-msgid "\t%s -l pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -l sökväg...\t[inte IRIX-kompatibel]\n" ++msgid "preserving permissions for %s" ++msgstr "bevarar rättigheter för %s" + +-#: ../chacl/chacl.c:68 +-#, c-format +-msgid "\t%s -r pathname...\t[not IRIX compatible]\n" +-msgstr "\t%s -r sökväg...\t[inte IRIX-kompatibel]\n" ++#: libacl/acl_error.c:34 ++msgid "Multiple entries of same type" ++msgstr "Flera poster av samma typ" + +-#: ../chacl/chacl.c:159 +-#, c-format +-msgid "%s: error removing access acl on \"%s\": %s\n" +-msgstr "%s: fel vid borttagning av acl på \"%s\": %s\n" ++#: libacl/acl_error.c:36 ++msgid "Duplicate entries" ++msgstr "Dubbla poster" + +-#: ../chacl/chacl.c:166 +-#, c-format +-msgid "%s: error removing default acl on \"%s\": %s\n" +-msgstr "%s: fel vid borttagning av acl på \"%s\": %s\n" ++#: libacl/acl_error.c:38 ++msgid "Missing or wrong entry" ++msgstr "Saknad eller felaktig post" + +-# Skum. Vad menar dom? +-#: ../chacl/chacl.c:185 +-#: ../chacl/chacl.c:204 +-#, c-format +-msgid "%s: access ACL '%s': %s at entry %d\n" +-msgstr "%s: åtkomst-ACL \"%s\": %s vid posten %d\n" ++#: libacl/acl_error.c:40 ++msgid "Invalid entry type" ++msgstr "Ogiltig posttyp" + +-#: ../chacl/chacl.c:272 ++#: tools/getfacl.c:488 + #, c-format +-msgid "%s: cannot get access ACL on '%s': %s\n" +-msgstr "%s: kan inte få åtkomst-ACL på \"%s\": %s\n" ++msgid "%s: Removing leading '/' from absolute path names\n" ++msgstr "%s: Tar bort inledande \"/\" från absoluta sökvägar\n" + +-#: ../chacl/chacl.c:278 ++#: tools/getfacl.c:559 + #, c-format +-msgid "%s: cannot get default ACL on '%s': %s\n" +-msgstr "%s: kan inte få standard-ACL på \"%s\": %s\n" ++msgid "%s %s -- get file access control lists\n" ++msgstr "%s %s -- hämta filåtkomstkontrollistor\n" + +-#: ../chacl/chacl.c:284 ++#: tools/getfacl.c:561 tools/getfacl.c:741 + #, c-format +-msgid "%s: cannot get access ACL text on '%s': %s\n" +-msgstr "%s: kan inte få åtkomst-ACL-text på \"%s\": %s\n" ++msgid "Usage: %s [-%s] file ...\n" ++msgstr "Användning: %s [-%s] fil ...\n" + +-#: ../chacl/chacl.c:291 ++#: tools/getfacl.c:567 + #, c-format +-msgid "%s: cannot get default ACL text on '%s': %s\n" +-msgstr "%s: kan inte få standard-ACL-text på \"%s\": %s\n" ++msgid " -d, --default display the default access control list\n" ++msgstr " -d, --default visa standardåtkomstkontrollistan\n" + +-#: ../chacl/chacl.c:317 +-#, c-format +-msgid "%s: cannot set access acl on \"%s\": %s\n" +-msgstr "%s: kan inte ställa in åtkomst-acl på \"%s\": %s\n" ++#: tools/getfacl.c:571 ++#, fuzzy, c-format ++msgid "" ++" -a, --access display the file access control list only\n" ++" -d, --default display the default access control list only\n" ++" -c, --omit-header do not display the comment header\n" ++" -e, --all-effective print all effective rights\n" ++" -E, --no-effective print no effective rights\n" ++" -s, --skip-base skip files that only have the base entries\n" ++" -R, --recursive recurse into subdirectories\n" ++" -L, --logical logical walk, follow symbolic links\n" ++" -P, --physical physical walk, do not follow symbolic links\n" ++" -t, --tabular use tabular output format\n" ++" -n, --numeric print numeric user/group identifiers\n" ++" -p, --absolute-names don't strip leading '/' in pathnames\n" ++msgstr "" ++" --access visa endast filåtkomstkontrollistan\n" ++" -d, --default visa endast standardåtkomstkontrollistan\n" ++" --omit-header visa inte kommentarshuvudet\n" ++" --all-effective skriv ut alla effektiva rättigheter\n" ++" --no-effective skriv inte ut några effektiva rättigheter\n" ++" --skip-base hoppa över filer som endast har basposterna\n" ++" -R, --recursive gå rekursivt ner i underkataloger\n" ++" -L, --logical logisk väg, följ symboliska länkar\n" ++" -P --physical fysisk väg, följ inte symboliska länkar\n" ++" --tabular använd tabulerat utformat\n" ++" --numeric skriv ut numeriska identifierare för användare/" ++"grupp\n" ++" --absolute-names ta inte bort inledande \"/\" i sökvägar\n" + +-#: ../chacl/chacl.c:323 +-#, c-format +-msgid "%s: cannot set default acl on \"%s\": %s\n" +-msgstr "%s: kan inte ställa in standard-acl på \"%s\": %s\n" ++#: tools/getfacl.c:586 tools/setfacl.c:300 ++#, fuzzy, c-format ++msgid "" ++" -v, --version print version and exit\n" ++" -h, --help this help text\n" ++msgstr "" ++" --version skriv ut version och avsluta\n" ++" --help denna hjälptext\n" + +-#: ../chacl/chacl.c:341 ++#: tools/getfacl.c:728 tools/setfacl.c:317 + #, c-format +-msgid "%s: opendir failed: %s\n" +-msgstr "%s: opendir misslyckades: %s\n" ++msgid "%s: Standard input: %s\n" ++msgstr "%s: Standard in: %s\n" + +-#: ../chacl/chacl.c:355 ++#: tools/getfacl.c:743 tools/setfacl.c:656 + #, c-format +-msgid "%s: malloc failed: %s\n" +-msgstr "%s: malloc misslyckades: %s\n" ++msgid "Try `%s --help' for more information.\n" ++msgstr "Prova \"%s --help\" för mer information.\n" + +-#: ../setfacl/do_set.c:404 ++#: tools/do_set.c:410 + #, c-format + msgid "%s: %s: Malformed access ACL `%s': %s at entry %d\n" + msgstr "%s: %s: Felaktigt formulerad åtkomst-ACL \"%s\": %s vid posten %d\n" + +-#: ../setfacl/do_set.c:431 ++#: tools/do_set.c:437 + #, c-format + msgid "%s: %s: Malformed default ACL `%s': %s at entry %d\n" + msgstr "%s: %s: Felaktigt formulerad standard-ACL \"%s\": %s vid posten %d\n" + +-#: ../setfacl/do_set.c:494 ++#: tools/do_set.c:501 + #, c-format + msgid "%s: %s: Only directories can have default ACLs\n" + msgstr "%s: %s: Endast kataloger kan ha standard-ACL:er\n" + +-#: ../setfacl/setfacl.c:151 ++#: tools/setfacl.c:148 + #, c-format + msgid "%s: %s: No filename found in line %d, aborting\n" + msgstr "%s: %s: Inget filnamn hittades på rad %d, avbryter\n" + +-#: ../setfacl/setfacl.c:156 ++#: tools/setfacl.c:153 + #, c-format + msgid "%s: No filename found in line %d of standard input, aborting\n" + msgstr "%s: Inget filnamn hittades på rad %d i standard in, avbryter\n" + +-#: ../setfacl/setfacl.c:177 ++#: tools/setfacl.c:174 + #, c-format + msgid "%s: %s: %s in line %d\n" + msgstr "%s: %s: %s på rad %d\n" + +-#: ../setfacl/setfacl.c:201 ++#: tools/setfacl.c:206 + #, c-format + msgid "%s: %s: Cannot change owner/group: %s\n" + msgstr "%s: %s: Kan inte ändra ägare/grupp: %s\n" + +-#: ../setfacl/setfacl.c:241 ++#: tools/setfacl.c:225 ++#, fuzzy, c-format ++msgid "%s: %s: Cannot change mode: %s\n" ++msgstr "%s: %s: Kan inte ändra ägare/grupp: %s\n" ++ ++#: tools/setfacl.c:267 + #, c-format + msgid "%s %s -- set file access control lists\n" + msgstr "%s %s -- ställ in filåtkomstkontrollistor\n" + +-#: ../setfacl/setfacl.c:243 +-#: ../setfacl/setfacl.c:701 ++#: tools/setfacl.c:269 tools/setfacl.c:654 + #, c-format + msgid "Usage: %s %s\n" + msgstr "Användning: %s %s\n" + +-#: ../setfacl/setfacl.c:246 ++#: tools/setfacl.c:272 ++#, c-format + msgid "" + " -m, --modify=acl modify the current ACL(s) of file(s)\n" + " -M, --modify-file=file read ACL entries to modify from file\n" +@@ -189,7 +194,8 @@ msgstr "" + " -b, --remove-all ta bort alla utökade ACL-poster\n" + " -k, --remove-default ta bort standard-ACL:en\n" + +-#: ../setfacl/setfacl.c:255 ++#: tools/setfacl.c:281 ++#, c-format + msgid "" + " --set=acl set the ACL of file(s), replacing the current ACL\n" + " --set-file=file read ACL entries to set from file\n" +@@ -199,7 +205,8 @@ msgstr "" + " --set-file=fil läs ACL-poster att ställa in från fil\n" + " --mask räkna om mask för effektiva rättigheter\n" + +-#: ../setfacl/setfacl.c:261 ++#: tools/setfacl.c:287 ++#, c-format + msgid "" + " -n, --no-mask don't recalculate the effective rights mask\n" + " -d, --default operations apply to the default ACL\n" +@@ -207,7 +214,8 @@ msgstr "" + " -n, --no-mask räkna inte om mask för effektiva rättigheter\n" + " -d, --default åtgärder gällande för standard-ACL:en\n" + +-#: ../setfacl/setfacl.c:266 ++#: tools/setfacl.c:292 ++#, c-format + msgid "" + " -R, --recursive recurse into subdirectories\n" + " -L, --logical logical walk, follow symbolic links\n" +@@ -221,125 +229,123 @@ msgstr "" + " --restore=fil återställ ACL:er (invers av \"getfacl -R\")\n" + " --test testläge (ACL:er ändras inte)\n" + +-#: ../setfacl/setfacl.c:274 +-#: ../getfacl/getfacl.c:558 +-msgid "" +-" --version print version and exit\n" +-" --help this help text\n" +-msgstr "" +-" --version skriv ut version och avsluta\n" +-" --help denna hjälptext\n" +- +-#: ../setfacl/setfacl.c:493 ++#: tools/setfacl.c:453 + #, c-format + msgid "%s: Option -%c incomplete\n" + msgstr "%s: Flaggan -%c inte komplett\n" + +-#: ../setfacl/setfacl.c:498 ++#: tools/setfacl.c:458 + #, c-format + msgid "%s: Option -%c: %s near character %d\n" + msgstr "%s: Flaggan -%c: %s nära tecknet %d\n" + +-#: ../setfacl/setfacl.c:584 ++#: tools/setfacl.c:534 + #, c-format + msgid "%s: %s in line %d of file %s\n" + msgstr "%s: %s på rad %d i filen %s\n" + +-#: ../setfacl/setfacl.c:592 ++#: tools/setfacl.c:542 + #, c-format + msgid "%s: %s in line %d of standard input\n" + msgstr "%s: %s på rad %d i standard in\n" + +-#: ../setfacl/setfacl.c:703 +-#: ../getfacl/getfacl.c:774 ++#: tools/chacl.c:46 + #, c-format +-msgid "Try `%s --help' for more information.\n" +-msgstr "Prova \"%s --help\" för mer information.\n" ++msgid "Usage:\n" ++msgstr "Användning:\n" + +-#: ../getfacl/getfacl.c:462 ++#: tools/chacl.c:47 + #, c-format +-msgid "%s: Removing leading '/' from absolute path names\n" +-msgstr "%s: Tar bort inledande \"/\" från absoluta sökvägar\n" ++msgid "\t%s acl pathname...\n" ++msgstr "\t%s acl sökväg...\n" + +-#: ../getfacl/getfacl.c:531 ++#: tools/chacl.c:48 + #, c-format +-msgid "%s %s -- get file access control lists\n" +-msgstr "%s %s -- hämta filåtkomstkontrollistor\n" ++msgid "\t%s -b acl dacl pathname...\n" ++msgstr "\t%s -b acl dacl sökväg...\n" + +-#: ../getfacl/getfacl.c:533 +-#: ../getfacl/getfacl.c:772 ++#: tools/chacl.c:49 + #, c-format +-msgid "Usage: %s [-%s] file ...\n" +-msgstr "Användning: %s [-%s] fil ...\n" ++msgid "\t%s -d dacl pathname...\n" ++msgstr "\t%s -d dacl sökväg...\n" + +-#: ../getfacl/getfacl.c:539 +-msgid " -d, --default display the default access control list\n" +-msgstr " -d, --default visa standardåtkomstkontrollistan\n" ++#: tools/chacl.c:50 ++#, c-format ++msgid "\t%s -R pathname...\n" ++msgstr "\t%s -R sökväg...\n" + +-#: ../getfacl/getfacl.c:543 +-msgid "" +-" --access display the file access control list only\n" +-" -d, --default display the default access control list only\n" +-" --omit-header do not display the comment header\n" +-" --all-effective print all effective rights\n" +-" --no-effective print no effective rights\n" +-" --skip-base skip files that only have the base entries\n" +-" -R, --recursive recurse into subdirectories\n" +-" -L, --logical logical walk, follow symbolic links\n" +-" -P --physical physical walk, do not follow symbolic links\n" +-" --tabular use tabular output format\n" +-" --numeric print numeric user/group identifiers\n" +-" --absolute-names don't strip leading '/' in pathnames\n" +-msgstr "" +-" --access visa endast filåtkomstkontrollistan\n" +-" -d, --default visa endast standardåtkomstkontrollistan\n" +-" --omit-header visa inte kommentarshuvudet\n" +-" --all-effective skriv ut alla effektiva rättigheter\n" +-" --no-effective skriv inte ut några effektiva rättigheter\n" +-" --skip-base hoppa över filer som endast har basposterna\n" +-" -R, --recursive gå rekursivt ner i underkataloger\n" +-" -L, --logical logisk väg, följ symboliska länkar\n" +-" -P --physical fysisk väg, följ inte symboliska länkar\n" +-" --tabular använd tabulerat utformat\n" +-" --numeric skriv ut numeriska identifierare för användare/grupp\n" +-" --absolute-names ta inte bort inledande \"/\" i sökvägar\n" ++#: tools/chacl.c:51 ++#, c-format ++msgid "\t%s -D pathname...\n" ++msgstr "\t%s -D sökväg...\n" + +-#: ../getfacl/getfacl.c:760 ++#: tools/chacl.c:52 + #, c-format +-msgid "%s: Standard input: %s\n" +-msgstr "%s: Standard in: %s\n" ++msgid "\t%s -B pathname...\n" ++msgstr "\t%s -B sökväg...\n" + +-#: ../libacl/acl_error.c:34 +-msgid "Multiple entries of same type" +-msgstr "Flera poster av samma typ" ++#: tools/chacl.c:53 ++#, c-format ++msgid "\t%s -l pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -l sökväg...\t[inte IRIX-kompatibel]\n" + +-#: ../libacl/acl_error.c:36 +-msgid "Duplicate entries" +-msgstr "Dubbla poster" ++#: tools/chacl.c:55 ++#, c-format ++msgid "\t%s -r pathname...\t[not IRIX compatible]\n" ++msgstr "\t%s -r sökväg...\t[inte IRIX-kompatibel]\n" + +-#: ../libacl/acl_error.c:38 +-msgid "Missing or wrong entry" +-msgstr "Saknad eller felaktig post" ++#: tools/chacl.c:146 ++#, c-format ++msgid "%s: error removing access acl on \"%s\": %s\n" ++msgstr "%s: fel vid borttagning av acl på \"%s\": %s\n" + +-#: ../libacl/acl_error.c:40 +-msgid "Invalid entry type" +-msgstr "Ogiltig posttyp" ++#: tools/chacl.c:153 ++#, c-format ++msgid "%s: error removing default acl on \"%s\": %s\n" ++msgstr "%s: fel vid borttagning av acl på \"%s\": %s\n" + +-#: ../libacl/perm_copy_fd.c:123 +-#: ../libacl/perm_copy_fd.c:135 +-#: ../libacl/perm_copy_fd.c:197 +-#: ../libacl/perm_copy_file.c:123 +-#: ../libacl/perm_copy_file.c:138 +-#: ../libacl/perm_copy_file.c:149 +-#: ../libacl/perm_copy_file.c:234 ++# Skum. Vad menar dom? ++#: tools/chacl.c:172 tools/chacl.c:191 + #, c-format +-msgid "setting permissions for %s" +-msgstr "ställer in rättigheter för %s" ++msgid "%s: access ACL '%s': %s at entry %d\n" ++msgstr "%s: åtkomst-ACL \"%s\": %s vid posten %d\n" + +-#: ../libacl/perm_copy_fd.c:185 +-#: ../libacl/perm_copy_file.c:198 +-#: ../libacl/perm_copy_file.c:223 ++#: tools/chacl.c:259 + #, c-format +-msgid "preserving permissions for %s" +-msgstr "bevarar rättigheter för %s" ++msgid "%s: cannot get access ACL on '%s': %s\n" ++msgstr "%s: kan inte få åtkomst-ACL på \"%s\": %s\n" + ++#: tools/chacl.c:265 ++#, c-format ++msgid "%s: cannot get default ACL on '%s': %s\n" ++msgstr "%s: kan inte få standard-ACL på \"%s\": %s\n" ++ ++#: tools/chacl.c:271 ++#, c-format ++msgid "%s: cannot get access ACL text on '%s': %s\n" ++msgstr "%s: kan inte få åtkomst-ACL-text på \"%s\": %s\n" ++ ++#: tools/chacl.c:278 ++#, c-format ++msgid "%s: cannot get default ACL text on '%s': %s\n" ++msgstr "%s: kan inte få standard-ACL-text på \"%s\": %s\n" ++ ++#: tools/chacl.c:304 ++#, c-format ++msgid "%s: cannot set access acl on \"%s\": %s\n" ++msgstr "%s: kan inte ställa in åtkomst-acl på \"%s\": %s\n" ++ ++#: tools/chacl.c:310 ++#, c-format ++msgid "%s: cannot set default acl on \"%s\": %s\n" ++msgstr "%s: kan inte ställa in standard-acl på \"%s\": %s\n" ++ ++#: tools/chacl.c:328 ++#, c-format ++msgid "%s: opendir failed: %s\n" ++msgstr "%s: opendir misslyckades: %s\n" ++ ++#: tools/chacl.c:342 ++#, c-format ++msgid "%s: malloc failed: %s\n" ++msgstr "%s: malloc misslyckades: %s\n" +-- +2.5.2 + diff --git a/0015-build-drop-aclincludedir-use-pkgincludedir.patch b/0015-build-drop-aclincludedir-use-pkgincludedir.patch new file mode 100644 index 0000000..915447a --- /dev/null +++ b/0015-build-drop-aclincludedir-use-pkgincludedir.patch @@ -0,0 +1,41 @@ +From 3d6d241eb1931d7f0be5a755c4c04daac0fde6bb Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch b/0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch new file mode 100644 index 0000000..fdb0399 --- /dev/null +++ b/0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch @@ -0,0 +1,56 @@ +From 3ae49e0a0b4bf22f137ec9a85f147815c972fdf0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/0017-build-ship-a-pkgconfig-file-for-libacl.patch b/0017-build-ship-a-pkgconfig-file-for-libacl.patch new file mode 100644 index 0000000..cc68546 --- /dev/null +++ b/0017-build-ship-a-pkgconfig-file-for-libacl.patch @@ -0,0 +1,71 @@ +From 90742e38c6b932d3c8182785f164c9ca282ea57e Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/0018-read_acl_-comments-seq-rename-line-to-lineno.patch b/0018-read_acl_-comments-seq-rename-line-to-lineno.patch new file mode 100644 index 0000000..beb4e27 --- /dev/null +++ b/0018-read_acl_-comments-seq-rename-line-to-lineno.patch @@ -0,0 +1,128 @@ +From 3d615724df45f9d7b3438ce7aa2d4f1704aad7d1 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/0019-read_acl_-comments-seq-switch-to-next_line.patch b/0019-read_acl_-comments-seq-switch-to-next_line.patch new file mode 100644 index 0000000..9d698fc --- /dev/null +++ b/0019-read_acl_-comments-seq-switch-to-next_line.patch @@ -0,0 +1,89 @@ +From 34d5069ab4187aece1b711a86af705ff121ac62d Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/0020-telldir-return-value-and-seekdir-second-parameters-a.patch b/0020-telldir-return-value-and-seekdir-second-parameters-a.patch new file mode 100644 index 0000000..3f00fc1 --- /dev/null +++ b/0020-telldir-return-value-and-seekdir-second-parameters-a.patch @@ -0,0 +1,27 @@ +From f2a5f57a20ffa007abc1fa24df1f76e18b74a425 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +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 + diff --git a/0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch b/0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch new file mode 100644 index 0000000..2b5545d --- /dev/null +++ b/0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch @@ -0,0 +1,65 @@ +From 809584283a3ce5b0250656faefb23a821782adbe Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + +-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 +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 + +-#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 + diff --git a/0022-add-__acl_-prefixes-to-internal-symbols.patch b/0022-add-__acl_-prefixes-to-internal-symbols.patch new file mode 100644 index 0000000..8385837 --- /dev/null +++ b/0022-add-__acl_-prefixes-to-internal-symbols.patch @@ -0,0 +1,309 @@ +From a2c4d71c2e84419a49db503ed59de4d3d1dca7dd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 +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 + #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 + #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 **)"ed_str, "ed_str_len, ++ if (__acl_high_water_alloc((void **)"ed_str, "ed_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 + #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 + diff --git a/0023-cp.test-Check-permissions-of-the-right-file.patch b/0023-cp.test-Check-permissions-of-the-right-file.patch new file mode 100644 index 0000000..16abdd8 --- /dev/null +++ b/0023-cp.test-Check-permissions-of-the-right-file.patch @@ -0,0 +1,29 @@ +From 62ce6354ef5a8eb5644908748f79c8cd18474d4c Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 +--- + 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 + diff --git a/0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch b/0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch new file mode 100644 index 0000000..a99b908 --- /dev/null +++ b/0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch @@ -0,0 +1,42 @@ +From 124e431e677f5ed3c45f71105a6770ceb96199dd Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 . +--- + 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 + diff --git a/0025-fix-compilation-with-latest-xattr-git.patch b/0025-fix-compilation-with-latest-xattr-git.patch new file mode 100644 index 0000000..1eadf6c --- /dev/null +++ b/0025-fix-compilation-with-latest-xattr-git.patch @@ -0,0 +1,236 @@ +From 79f563779b9b9ba89cc2352d70e3cdf27acff513 Mon Sep 17 00:00:00 2001 +From: Brice De Bruyne +Date: Mon, 27 Apr 2015 14:57:56 +0200 +Subject: [PATCH 25/34] fix compilation with latest xattr git + +The attr package has removed, but acl has not been adapted yet. + +I took the liberty to cook up this patch that includes instead of + 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 +-#include ++#include + #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 +-#include ++#include + #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 +-#include ++#include + #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 +-#include ++#include + #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 +-#include ++#include + #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 + #include + #include +-#include ++#include + #include + #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 + #include + #include +-#include ++#include + #include + #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 +-#include ++#include + #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 + #include + #include +-#include ++#include + #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 + #include ++#include + #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 . +-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 + diff --git a/0026-getfacl-Fix-memory-leak.patch b/0026-getfacl-Fix-memory-leak.patch new file mode 100644 index 0000000..e47c2ad --- /dev/null +++ b/0026-getfacl-Fix-memory-leak.patch @@ -0,0 +1,28 @@ +From 5d8de21bef5ee62ebca93ae81515b6065626e559 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Thu, 16 Jul 2015 14:04:20 +0200 +Subject: [PATCH 26/34] getfacl: Fix memory leak + +Reported by Andreas Stieger +(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 + diff --git a/0027-Fix-the-display-block-nesting-in-acl.5.patch b/0027-Fix-the-display-block-nesting-in-acl.5.patch new file mode 100644 index 0000000..a786de3 --- /dev/null +++ b/0027-Fix-the-display-block-nesting-in-acl.5.patch @@ -0,0 +1,31 @@ +From 226e93f4d17b68f4cca02fb7b34f22fd9a7ab237 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 + diff --git a/0028-setfacl-man-page-Minor-wording-improvements.patch b/0028-setfacl-man-page-Minor-wording-improvements.patch new file mode 100644 index 0000000..7edfc89 --- /dev/null +++ b/0028-setfacl-man-page-Minor-wording-improvements.patch @@ -0,0 +1,50 @@ +From f05131d8d16751dbb586058fabc8cb404dec23a2 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 + diff --git a/0029-getfacl-Fix-minor-resource-leak.patch b/0029-getfacl-Fix-minor-resource-leak.patch new file mode 100644 index 0000000..b4a517b --- /dev/null +++ b/0029-getfacl-Fix-minor-resource-leak.patch @@ -0,0 +1,85 @@ +From 519e3932898baba1e7eeb0d9d89acee796da61f5 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +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 . +--- + 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 + diff --git a/0030-Do-not-export-symbols-that-are-not-supposed-to-be-ex.patch b/0030-Do-not-export-symbols-that-are-not-supposed-to-be-ex.patch new file mode 100644 index 0000000..ebe56c4 --- /dev/null +++ b/0030-Do-not-export-symbols-that-are-not-supposed-to-be-ex.patch @@ -0,0 +1,34 @@ +From fc027ffa5eefe6d563328059348a8929c4789c17 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +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 + diff --git a/0031-walk_tree-mark-internal-variables-as-static.patch b/0031-walk_tree-mark-internal-variables-as-static.patch new file mode 100644 index 0000000..bedf22c --- /dev/null +++ b/0031-walk_tree-mark-internal-variables-as-static.patch @@ -0,0 +1,34 @@ +From 4a5140636e487aeb1a8a43dbecae3ab395d31392 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +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 + diff --git a/0032-ignore-configure.lineno.patch b/0032-ignore-configure.lineno.patch new file mode 100644 index 0000000..32dd5ae --- /dev/null +++ b/0032-ignore-configure.lineno.patch @@ -0,0 +1,25 @@ +From fa03d2475682e4ab345c9a63bd6b88117bd45f0f Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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 + diff --git a/acl-2.2.52-tests.patch b/acl-2.2.52-tests.patch index bce4736..9116dea 100644 --- a/acl-2.2.52-tests.patch +++ b/acl-2.2.52-tests.patch @@ -76,105 +76,3 @@ index 630e9fb..dd7fe08 100644 1.7.1 -From 3720a8a3cf55e295eca55457fad8177f6277f620 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Mon, 20 May 2013 15:00:47 +0200 -Subject: [PATCH 2/2] 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 --- -1.7.1 - diff --git a/acl-2.2.52.src.tar.gz b/acl-2.2.52.src.tar.gz deleted file mode 100644 index 11c3dfb..0000000 --- a/acl-2.2.52.src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23 -size 386604 diff --git a/acl-2.2.52.src.tar.gz.sig b/acl-2.2.52.src.tar.gz.sig deleted file mode 100644 index 4f79195..0000000 Binary files a/acl-2.2.52.src.tar.gz.sig and /dev/null differ diff --git a/acl-2.2.52.tar.bz2 b/acl-2.2.52.tar.bz2 new file mode 100644 index 0000000..83c455e --- /dev/null +++ b/acl-2.2.52.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7c876ebe03ea7fcadbccc045accf73366345112ad6b7e70a90916d86bb8f262 +size 108250 diff --git a/acl.changes b/acl.changes index db4f597..8f8028f 100644 --- a/acl.changes +++ b/acl.changes @@ -1,4 +1,42 @@ ------------------------------------------------------------------- +Wed Dec 2 16:13:20 UTC 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 +------------------------------------------------------------------- Tue Sep 23 15:32:17 UTC 2014 - jengelh@inai.de - Reduce size of filelist by using wildcards; diff --git a/acl.spec b/acl.spec index 55f2e59..ad68ffa 100644 --- a/acl.spec +++ b/acl.spec @@ -1,7 +1,7 @@ # # spec file for package acl # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,15 +27,57 @@ 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: http://download.savannah.gnu.org/releases-noredirect/acl/%name-%version.src.tar.gz -Source1: http://download.savannah.gnu.org/releases-noredirect/acl/%name-%version.src.tar.gz.sig +# 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 -Patch0: builddefs.in.diff -Patch2: 0001-Use-OS-byteswapping-macros.patch -Patch3: acl-2.2.52-tests.patch + +# 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 + +# Local changes +Patch100: 0001-Use-OS-byteswapping-macros.patch +Patch101: acl-2.2.52-tests.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-tools BuildRequires: libattr-devel +BuildRequires: libtool +BuildRequires: pkg-config #BuildRequires: gpg-offline BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -80,47 +122,73 @@ to develop applications that require these. %prep %setup -q -n acl-%version -%patch0 -p1 +%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 + +%patch100 -p1 +%patch101 -p1 %build +chmod a+x po/update-potfiles +sh autogen.sh export OPTIMIZER="$RPM_OPT_FLAGS -fPIC" export DEBUG=-DNDEBUG CFLAGS="$RPM_OPT_FLAGS" %configure \ - --prefix=/ \ - --exec-prefix=/ \ - --sbindir=/bin \ + --prefix=/usr \ + --exec-prefix=/usr \ --libdir=/%{_lib} \ - --libexecdir=/%{_lib} \ + --libexecdir=/%{_lib} \ --disable-static \ + --docdir=%{_defaultdocdir}/%{name} \ --with-pic %{__make} %{?_smp_mflags} %check -if ./setfacl/setfacl -m u:`id -u`:rwx .; then - make tests || exit $? - if test 0 = `id -u`; then - make root-tests || exit $? - fi +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 %install -DIST_ROOT="$RPM_BUILD_ROOT" -DIST_INSTALL=`pwd`/install.manifest -DIST_INSTALL_DEV=`pwd`/install-dev.manifest -DIST_INSTALL_LIB=`pwd`/install-lib.manifest -export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB -/usr/bin/make install DIST_MANIFEST="$DIST_INSTALL" -/usr/bin/make install-dev DIST_MANIFEST="$DIST_INSTALL_DEV" -/usr/bin/make install-lib DIST_MANIFEST="$DIST_INSTALL_LIB" -%{__mkdir_p} %{buildroot}%{_libdir} +%make_install +%{__mkdir_p} %buildroot%{_libdir} %{__ln_s} -v /%{_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 @@ -142,6 +210,7 @@ export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB %_includedir/sys/acl.h %_libdir/libacl.so %_mandir/man3/*.3* +%_libdir/pkgconfig/libacl.pc %files -n %lname %defattr(755,root,root,755) diff --git a/builddefs.in.diff b/builddefs.in.diff deleted file mode 100644 index 6635284..0000000 --- a/builddefs.in.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: acl-2.2.45/include/builddefs.in -=================================================================== ---- acl-2.2.45.orig/include/builddefs.in -+++ acl-2.2.45/include/builddefs.in -@@ -33,7 +33,7 @@ PKG_LIB_DIR = @libdir@@libdirsuffix@ - PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@ - PKG_INC_DIR = @includedir@ - PKG_MAN_DIR = @mandir@ --PKG_DOC_DIR = @datadir@/doc/@pkg_name@ -+PKG_DOC_DIR = @datadir@/doc/packages/@pkg_name@ - PKG_LOCALE_DIR = @datadir@/locale - - CC = @cc@