From 99ce7cd2ce144ba630ef73af206d25bbac22df6d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 4 Jul 2024 17:07:41 +0000 Subject: [PATCH] make.sh: Ensure that we enter the chroot only in our own NS Signed-off-by: Michael Tremer --- make.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/make.sh b/make.sh index 2c231fdd7..afd117b63 100755 --- a/make.sh +++ b/make.sh @@ -494,6 +494,11 @@ enterchroot() { local PATH="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin" + # Check if we are running in our namespace + if [ -z "${IN_NAMESPACE}" ]; then + exiterror "Not running in namespace" + fi + # Prepend any custom changes to PATH if [ -n "${CUSTOM_PATH}" ]; then PATH="${CUSTOM_PATH}:${PATH}"