diff --git a/acl-2.2.39-exitcode.patch b/acl-2.2.39-exitcode.patch new file mode 100644 index 0000000..e166036 --- /dev/null +++ b/acl-2.2.39-exitcode.patch @@ -0,0 +1,27 @@ +--- acl-2.2.39/setfacl/setfacl.c.exitcode 2007-11-08 14:45:01.000000000 +0100 ++++ acl-2.2.39/setfacl/setfacl.c 2007-11-08 14:39:19.000000000 +0100 +@@ -144,7 +144,7 @@ restore( + if (error < 0) + goto fail; + if (error == 0) +- return 0; ++ return status; + + if (path_p == NULL) { + if (filename) { +@@ -158,6 +158,7 @@ restore( + "aborting\n"), + progname, backup_line); + } ++ status = 1; + goto getout; + } + +@@ -176,6 +177,7 @@ restore( + fprintf(stderr, _("%s: %s: %s in line %d\n"), + progname, xquote(filename), strerror(errno), + line); ++ status = 1; + goto getout; + } + diff --git a/acl-2.2.39-walk.patch b/acl-2.2.39-walk.patch index e8c2607..923cbf6 100644 --- a/acl-2.2.39-walk.patch +++ b/acl-2.2.39-walk.patch @@ -1,5 +1,5 @@ ---- acl-2.2.39/getfacl/getfacl.c 2007-11-07 09:49:56.000000000 +0100 -+++ ../devel/acl-2.2.45/getfacl/getfacl.c 2007-11-07 09:53:50.000000000 +0100 +--- acl-2.2.39/getfacl/getfacl.c.old 2007-11-08 14:38:56.000000000 +0100 ++++ acl-2.2.39/getfacl/getfacl.c 2007-11-08 14:39:19.000000000 +0100 @@ -598,17 +598,17 @@ int __do_print(const char *file, const s char *resolve_symlinks(const char *file) { @@ -27,3 +27,32 @@ return path; } +--- acl-2.2.39/setfacl/setfacl.c.old 2006-06-20 08:51:25.000000000 +0200 ++++ acl-2.2.39/setfacl/setfacl.c 2007-11-08 14:39:19.000000000 +0100 +@@ -314,17 +316,17 @@ int __do_set(const char *file, const str + char *resolve_symlinks(const char *file) + { + static char buffer[4096]; ++ struct stat stat; + char *path = NULL; +- ssize_t len; + +- len = readlink(file, buffer, sizeof(buffer)-1); +- if (len < 0) { +- if (errno == EINVAL) /* not a symlink, use given path */ +- path = (char *)file; +- } else { +- buffer[len+1] = '\0'; +- path = buffer; +- } ++ if (lstat(file, &stat) == -1) ++ return path; ++ ++ if (S_ISLNK(stat.st_mode) && !opt_walk_physical) ++ path = realpath(file, buffer); ++ else ++ path = (char *)file; /* not a symlink, use given path */ ++ + return path; + } + diff --git a/acl.spec b/acl.spec index e783100..95cfccb 100644 --- a/acl.spec +++ b/acl.spec @@ -1,7 +1,7 @@ Summary: Access control list utilities Name: acl Version: 2.2.39 -Release: 5%{?dist} +Release: 6%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libattr-devel >= 2.4.1 Source: ftp://oss.sgi.com/projects/xfs/cmd_tars/acl_%{version}-1.tar.gz @@ -9,6 +9,7 @@ Patch0: acl-2.2.3-multilib.patch Patch1: acl-2.2.39-build.patch Patch2: acl-2.2.39-path_max.patch Patch3: acl-2.2.39-walk.patch +Patch4: acl-2.2.39-exitcode.patch BuildRequires: autoconf, libtool >= 1.5, gettext License: GPL Group: System Environment/Base @@ -47,6 +48,7 @@ defined in POSIX 1003.1e draft standard 17. %patch1 -p1 -b .build %patch2 -p1 -b .path_max %patch3 -p1 -b .walk +%patch4 -p1 -b .exitcode autoconf %build @@ -102,6 +104,9 @@ rm -rf $RPM_BUILD_ROOT /%{_lib}/libacl.so.* %changelog +* Thu Nov 8 2007 Jiri Moskovcak 2.2.39-6 +- Fixed setfacl exitcodes + * Wed Nov 7 2007 Jiri Moskovcak 2.2.39-5 - New walk patch backported from upstream - better symlink handling