From 12bf920969f0b1aaecab29c8e2d3ff280402d75b Mon Sep 17 00:00:00 2001 From: Desobediente Civil Date: Mon, 27 Jun 2016 19:10:00 -0300 Subject: [PATCH 1/4] Quoting the destination as proposed in #1672 --- qvm-tools/qubes-hcl-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index 031b16e9..e038aa16 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -209,7 +209,7 @@ versions: FIXLINK --- -" >> $HOME/$FILENAME.yml +" >> "$HOME/$FILENAME.yml" if [[ "$SUPPORT_FILES" == 1 ]] From fa83298153949456ff7d4de64fb2277394d4d182 Mon Sep 17 00:00:00 2001 From: Desobediente Civil Date: Mon, 27 Jun 2016 19:15:46 -0300 Subject: [PATCH 2/4] Modifying support cpio as proposed in #1672 --- qvm-tools/qubes-hcl-report | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index e038aa16..72ca74f7 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -217,7 +217,7 @@ if [[ "$SUPPORT_FILES" == 1 ]] # cpio cd $TEMP_DIR - find -print0 |cpio --quiet -o -H crc --null |gzip >$HOME/$FILENAME.cpio.gz + find -print0 | cpio --quiet -o -H crc --null | gzip > "$HOME/$FILENAME.cpio.gz" cd fi @@ -225,7 +225,7 @@ fi if [[ "$COPY2VM" != "dom0" ]] then # Copy to VM - qvm-start -q $COPY2VM 2>/dev/null + qvm-start -q $COPY2VM 2> /dev/null if [[ -f "$HOME/$FILENAME.cpio.gz" ]] then From 5081b58ee88d3b1d204cb90a02b408e2080b1b1c Mon Sep 17 00:00:00 2001 From: Desobediente Civil Date: Mon, 27 Jun 2016 19:19:00 -0300 Subject: [PATCH 3/4] Quoting all `cat`s as proposed in #1672 --- qvm-tools/qubes-hcl-report | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index 72ca74f7..e5e62a45 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -229,12 +229,12 @@ if [[ "$COPY2VM" != "dom0" ]] if [[ -f "$HOME/$FILENAME.cpio.gz" ]] then - cat $HOME/$FILENAME.cpio.gz | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.cpio.gz" + cat "$HOME/$FILENAME.cpio.gz" | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.cpio.gz" fi if [[ -f "$HOME/$FILENAME.yml" ]] then - cat $HOME/$FILENAME.yml | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.yml" + cat "$HOME/$FILENAME.yml" | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.yml" fi fi From 59e687c3f3fe5ebbbb5299e87fc8fd878ba8650e Mon Sep 17 00:00:00 2001 From: Desobediente Civil Date: Mon, 27 Jun 2016 19:23:53 -0300 Subject: [PATCH 4/4] And some more quoting to satisfy #1672 --- qvm-tools/qubes-hcl-report | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index e5e62a45..671f0000 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -229,12 +229,12 @@ if [[ "$COPY2VM" != "dom0" ]] if [[ -f "$HOME/$FILENAME.cpio.gz" ]] then - cat "$HOME/$FILENAME.cpio.gz" | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.cpio.gz" + cat "$HOME/$FILENAME.cpio.gz" | qvm-run -a -q --pass-io $COPY2VM "cat > \"/home/user/$FILENAME.cpio.gz\"" fi if [[ -f "$HOME/$FILENAME.yml" ]] then - cat "$HOME/$FILENAME.yml" | qvm-run -a -q --pass-io $COPY2VM "cat >/home/user/$FILENAME.yml" + cat "$HOME/$FILENAME.yml" | qvm-run -a -q --pass-io $COPY2VM "cat > \"/home/user/$FILENAME.yml\"" fi fi