aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorpennae <82953136+pennae@users.noreply.github.com>2022-05-25 11:55:13 +0000
committerGitHub <noreply@github.com>2022-05-25 11:55:13 +0000
commitb092afe77d514ddbab02e20f8adf0acc58fa4aaf (patch)
tree13e9942f85a507525047d246ebd12ffaa3c813ac /configure.ac
parentd6d6bbd9ef1eed6443165866cd7bd27faa9586a1 (diff)
parent09e55010f9c7d0e60d7c97d1881cc696df3644ae (diff)
Merge branch 'master' into lto
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a86d88fad..15d5606c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,17 @@ esac
AC_ARG_WITH(sandbox-shell, AS_HELP_STRING([--with-sandbox-shell=PATH],[path of a statically-linked shell to use as /bin/sh in sandboxes]),
sandbox_shell=$withval)
AC_SUBST(sandbox_shell)
+if test ${cross_compiling:-no} = no && ! test -z ${sandbox_shell+x}; then
+ AC_MSG_CHECKING([whether sandbox-shell has the standalone feature])
+ # busybox shell sometimes allows executing other busybox applets,
+ # even if they are not in the path, breaking our sandbox
+ if PATH= $sandbox_shell -c "busybox" 2>&1 | grep -qv "not found"; then
+ AC_MSG_RESULT(enabled)
+ AC_MSG_ERROR([Please disable busybox FEATURE_SH_STANDALONE])
+ else
+ AC_MSG_RESULT(disabled)
+ fi
+fi
# Expand all variables in config.status.
test "$prefix" = NONE && prefix=$ac_default_prefix