summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-27 00:46:38 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-27 00:51:51 +0000
commit6389f9718f5f826736399c674f75c465e3203454 (patch)
treeda1280eae5ffc556b00a1cb4c591749369e42639
parentAdding manpage references in usage message in main container program. (diff)
downloadcompute-tools-6389f9718f5f826736399c674f75c465e3203454.tar.xz
compute-tools-6389f9718f5f826736399c674f75c465e3203454.zip
Hardening quoting in container main program.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xbin/container6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/container b/bin/container
index 17bce7d..1ec73ef 100755
--- a/bin/container
+++ b/bin/container
@@ -42,9 +42,9 @@ COMMANDS="${1}"
# Options
shift 1
-OPTIONS="${@}"
+OPTIONS="${*}"
-for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g')
+for COMMAND in $(echo "${COMMANDS}" | sed -e 's|,| |g')
do
if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
@@ -88,7 +88,7 @@ do
then
for TARGET in ${IRK_TARGETS}
do
- irk ${TARGET} "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
+ irk "${TARGET}" "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
done
fi
fi