Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/slave-build-connect
diff options
context:
space:
mode:
Diffstat (limited to 'bin/slave-build-connect')
-rwxr-xr-xbin/slave-build-connect7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/slave-build-connect b/bin/slave-build-connect
index 2ca72a3..119592e 100755
--- a/bin/slave-build-connect
+++ b/bin/slave-build-connect
@@ -3,11 +3,12 @@
# shellcheck source=conf/default.conf
. "${0%/*}/../conf/default.conf"
-if [ "${SSH_ORIGINAL_COMMAND%% *}" = "get-assignment" ] || \
- [ "${SSH_ORIGINAL_COMMAND%% *}" = "return-assignment" ]; then
+if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \
+ [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xreturn-assignment' ] || \
+ [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xping-from-slave' ]; then
# small check to prevent some shell-injections
- if echo "${SSH_ORIGINAL_COMMAND}" | \
+ if printf '%s\n' "${SSH_ORIGINAL_COMMAND}" | \
grep -q '[^-a-zA-Z0-9.+_ ]'; then
>&2 printf 'Invalid command: "%s".\n' "${SSH_ORIGINAL_COMMAND}"