summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-07-31 01:14:19 +0200
committerHolger Levsen <holger@layer-acht.org>2016-08-02 16:24:25 +0200
commit4960398d1165014a3cdaa0d17bc4a0da44643390 (patch)
tree69a616b275c830f283e1521e4a76a243e7267d23
parentee6b19b44fbe82f4b5663c4fe4faf00ceb68cc58 (diff)
downloadjenkins.debian.net-4960398d1165014a3cdaa0d17bc4a0da44643390.tar.xz
reproducible/lede: only alllow certain functions to be executed remote
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xbin/reproducible_lede.sh10
-rwxr-xr-xbin/reproducible_openwrt.sh10
2 files changed, 20 insertions, 0 deletions
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index b184f550..77ea110a 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -22,6 +22,16 @@ set -e
case $1 in
node)
shift
+ case $1 in
+ openwrt_build |\
+ openwrt_get_banner |\
+ openwrt_mktempdir |\
+ openwrt_cleanup_tmpdirs) ;; # this is the allowed list
+ *)
+ echo "Unsupported remote node function $@"
+ exit 1
+ ;;
+ esac
$@
exit $?
;;
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 0d1c740a..b1da7060 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -22,6 +22,16 @@ set -e
case $1 in
node)
shift
+ case $1 in
+ openwrt_build |\
+ openwrt_get_banner |\
+ openwrt_mktempdir |\
+ openwrt_cleanup_tmpdirs) ;; # this is the allowed list
+ *)
+ echo "Unsupported remote node function $@"
+ exit 1
+ ;;
+ esac
$@
exit $?
;;