preserve failed setfacl return code
... and make the license tag more precise.
This commit is contained in:
parent
53758727ee
commit
07b51b662e
60
0003-acl-2.3.1-setfacl-preserve-failed-status.patch
Normal file
60
0003-acl-2.3.1-setfacl-preserve-failed-status.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
From 7ce89c695e76ec41fcebd83f8b728f63b0361a2d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Renaud Metrich <rmetrich@redhat.com>
|
||||||
|
Date: Thu, 5 Oct 2023 11:17:51 +0200
|
||||||
|
Subject: [PATCH] setfacl: preserve the failed status when processing multiple
|
||||||
|
files
|
||||||
|
|
||||||
|
Resolves the following bug:
|
||||||
|
```
|
||||||
|
$ mkdir FOO
|
||||||
|
$ setfacl -m d:g:user:rwX -m g:user:rwX ./FOO/bar ./FOO
|
||||||
|
setfacl: ./FOO/bar: No such file or directory
|
||||||
|
$ echo $?
|
||||||
|
0
|
||||||
|
```
|
||||||
|
|
||||||
|
(Cleanup added while applying.)
|
||||||
|
|
||||||
|
Upstream-commit: 7ce89c695e76ec41fcebd83f8b728f63b0361a2d
|
||||||
|
---
|
||||||
|
tools/setfacl.c | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/setfacl.c b/tools/setfacl.c
|
||||||
|
index fd0bf2e..4140276 100644
|
||||||
|
--- a/tools/setfacl.c
|
||||||
|
+++ b/tools/setfacl.c
|
||||||
|
@@ -332,7 +332,7 @@ int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int opt;
|
||||||
|
int saw_files = 0;
|
||||||
|
- int status = 0;
|
||||||
|
+ int status = 0, status2;
|
||||||
|
FILE *file;
|
||||||
|
int which;
|
||||||
|
int lineno;
|
||||||
|
@@ -555,7 +555,9 @@ int main(int argc, char *argv[])
|
||||||
|
goto synopsis;
|
||||||
|
saw_files = 1;
|
||||||
|
|
||||||
|
- status = next_file(optarg, seq);
|
||||||
|
+ status2 = next_file(optarg, seq);
|
||||||
|
+ if (status == 0)
|
||||||
|
+ status = status2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'B': /* restore ACL backup */
|
||||||
|
@@ -642,7 +644,9 @@ int main(int argc, char *argv[])
|
||||||
|
goto synopsis;
|
||||||
|
saw_files = 1;
|
||||||
|
|
||||||
|
- status = next_file(argv[optind++], seq);
|
||||||
|
+ status2 = next_file(argv[optind++], seq);
|
||||||
|
+ if (status == 0)
|
||||||
|
+ status = status2;
|
||||||
|
}
|
||||||
|
if (!saw_files)
|
||||||
|
goto synopsis;
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
14
acl.spec
14
acl.spec
@ -4,7 +4,7 @@
|
|||||||
Summary: Access control list utilities
|
Summary: Access control list utilities
|
||||||
Name: acl
|
Name: acl
|
||||||
Version: 2.3.1
|
Version: 2.3.1
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
BuildRequires: gawk
|
BuildRequires: gawk
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -21,9 +21,15 @@ Source2: agruen-key.gpg
|
|||||||
|
|
||||||
# avoid permission denied problem with LD_PRELOAD in the test-suite
|
# avoid permission denied problem with LD_PRELOAD in the test-suite
|
||||||
Patch1: 0001-acl-2.2.53-test-runwrapper.patch
|
Patch1: 0001-acl-2.2.53-test-runwrapper.patch
|
||||||
|
|
||||||
|
# add georgian translation
|
||||||
Patch2: 0002-add-georgian.patch
|
Patch2: 0002-add-georgian.patch
|
||||||
|
|
||||||
License: GPL-2.0-or-later
|
# preserve failed setfacl return code (RHEL-3909)
|
||||||
|
# https://git.savannah.nongnu.org/cgit/acl.git/commit/?id=7ce89c695e76ec41fcebd83f8b728f63b0361a2d
|
||||||
|
Patch3: 0003-acl-2.3.1-setfacl-preserve-failed-status.patch
|
||||||
|
|
||||||
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
URL: https://savannah.nongnu.org/projects/acl
|
URL: https://savannah.nongnu.org/projects/acl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -131,6 +137,10 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}*
|
|||||||
%{_libdir}/libacl.so.*
|
%{_libdir}/libacl.so.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 06 2023 Lukáš Zaoral <lzaoral@redhat.com> - 2.3.1-10
|
||||||
|
- preserve failed setfacl return code (RHEL-3909)
|
||||||
|
- make the license tag more precise
|
||||||
|
|
||||||
* Mon Sep 11 2023 Temuri Doghonadze <temuri.doghonadze@gmail.com> - 2.3.1-9
|
* Mon Sep 11 2023 Temuri Doghonadze <temuri.doghonadze@gmail.com> - 2.3.1-9
|
||||||
- Backport Georgian locale from git
|
- Backport Georgian locale from git
|
||||||
- Note, it will not be needed after release of new version of acl
|
- Note, it will not be needed after release of new version of acl
|
||||||
|
Loading…
Reference in New Issue
Block a user