[PATCH v2 10/10] sandbox/sandboxX.sh: quote the command line arguments

Stephen Smalley <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <[email protected]>
Quote the command line arguments to avoid misinterpretation
if they contain whitespace or a test operator.

Signed-off-by: Stephen Smalley <[email protected]>
---
 sandbox/sandboxX.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sandbox/sandboxX.sh b/sandbox/sandboxX.sh
index 28169182..e733aff3 100644
--- a/sandbox/sandboxX.sh
+++ b/sandbox/sandboxX.sh
@@ -2,9 +2,9 @@
 trap "" TERM
 context=`id -Z | secon -t -l -P`
 export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
-[ -z $1 ] && export WAYLAND_NATIVE="no" || export WAYLAND_NATIVE="$1"
-[ -z $2 ] && export SCREENSIZE="1000x700" || export SCREENSIZE="$2"
-[ -z $3 ] && export DPI="96" || export DPI="$3"
+[ -z "$1" ] && export WAYLAND_NATIVE="no" || export WAYLAND_NATIVE="$1"
+[ -z "$2" ] && export SCREENSIZE="1000x700" || export SCREENSIZE="$2"
+[ -z "$3" ] && export DPI="96" || export DPI="$3"
 trap "exit 0" HUP
 
 mkdir -p ~/.config/openbox
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.