Message ID | 20200810001514.114949-1-mail@aparcar.org |
---|---|
State | Under Review |
Delegated to: | Paul Spooren |
Headers | show |
Series | busybox: Disable `which` command | expand |
diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 29724041f4..2944369a69 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -997,7 +997,7 @@ config BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_FANCY default n config BUSYBOX_DEFAULT_WHICH bool - default y + default n config BUSYBOX_DEFAULT_MINIPS bool default n
The `which` command returns the first found path to a binary specified. It's behaviour is identical to the shell built in `command -v`. Shellcheck even prints a warning if `which` is used (SC2230). Once neither `openwrt.git` nor related repositories make use of `which`, the command should be disabled for busybox, freeing roughly 4kB. Signed-off-by: Paul Spooren <mail@aparcar.org> --- This patch depends on the following three patches: openwrt.git: https://patchwork.ozlabs.org/project/openwrt/list/?series=194732 packages.git: https://github.com/openwrt/packages/pull/13059 luci.git: https://github.com/openwrt/luci/pull/4342 package/utils/busybox/Config-defaults.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)