[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] setfacl: preserve the failed status when processing multiple fil
From: |
Lukáš Zaoral |
Subject: |
[PATCH] setfacl: preserve the failed status when processing multiple files |
Date: |
Thu, 5 Oct 2023 11:17:51 +0200 |
From: Renaud Metrich <rmetrich@redhat.com>
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
```
---
tools/setfacl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/setfacl.c b/tools/setfacl.c
index fd0bf2e..fd32692 100644
--- a/tools/setfacl.c
+++ b/tools/setfacl.c
@@ -555,7 +555,7 @@ int main(int argc, char *argv[])
goto synopsis;
saw_files = 1;
- status = next_file(optarg, seq);
+ status |= next_file(optarg, seq);
break;
case 'B': /* restore ACL backup */
@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
goto synopsis;
saw_files = 1;
- status = next_file(argv[optind++], seq);
+ status |= next_file(argv[optind++], seq);
}
if (!saw_files)
goto synopsis;
--
2.41.0
- [PATCH] setfacl: preserve the failed status when processing multiple files,
Lukáš Zaoral <=