aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-04-09 08:02:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-04-09 08:02:33 +0000
commit1a8f907d2d73e6d2a2379ff33bed7ab07cadbeec (patch)
tree2fd2e2684e290a25693db50ed476ada1f6e07795 /package/utils/busybox
parent10dd1867866b21ba97851fc5e1814e48b4f3557b (diff)
downloadmaster-187ad058-1a8f907d2d73e6d2a2379ff33bed7ab07cadbeec.tar.gz
master-187ad058-1a8f907d2d73e6d2a2379ff33bed7ab07cadbeec.tar.bz2
master-187ad058-1a8f907d2d73e6d2a2379ff33bed7ab07cadbeec.zip
busybox: fix regression in handling non-existant find path arguments (#19439)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45321 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils/busybox')
-rw-r--r--package/utils/busybox/patches/280-fix_find_regression.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/utils/busybox/patches/280-fix_find_regression.patch b/package/utils/busybox/patches/280-fix_find_regression.patch
new file mode 100644
index 0000000000..50217506af
--- /dev/null
+++ b/package/utils/busybox/patches/280-fix_find_regression.patch
@@ -0,0 +1,31 @@
+find: fix regression in status processing for path arguments
+
+Regression added in commit 14158b4127dba30466c50147b868a6a89702960b
+"find: add optional support for '-exec ... {} +'"
+
+This commit causes find to exit on the first path argument that was not
+found, which breaks existing scripts and is incompatible to other
+implementations.
+
+Instead of exiting on the first failure, return EXIT_FAILURE at the end
+if any error occurred.
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+--- a/findutils/find.c
++++ b/findutils/find.c
+@@ -1460,12 +1460,10 @@ int find_main(int argc UNUSED_PARAM, cha
+ NULL, /* user data */
+ 0) /* depth */
+ ) {
+- status = EXIT_FAILURE;
+- goto out;
++ status |= EXIT_FAILURE;
+ }
+ }
+
+- IF_FEATURE_FIND_EXEC_PLUS(status = flush_exec_plus();)
+-out:
++ IF_FEATURE_FIND_EXEC_PLUS(status |= flush_exec_plus();)
+ return status;
+ }