dispvm: don't use perl to decode base64-encoded script

This looks like an overkill. And more importantly - required modules are
not installed by default, making it impossible to use in default minimal
template.

Fixes QubesOS/qubes-issues#1610
This commit is contained in:
Marek Marczykowski-Górecki 2017-05-14 23:26:18 +02:00
parent 13c99f1f10
commit 9a7dee5b46
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -38,7 +38,7 @@ possibly_run_save_script() {
ENCODED_SCRIPT=$(qubesdb-read /qubes-save-script) ENCODED_SCRIPT=$(qubesdb-read /qubes-save-script)
if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi
tmpfile=$(mktemp /tmp/qubes-save-script.XXXXXXXXX) tmpfile=$(mktemp /tmp/qubes-save-script.XXXXXXXXX)
echo $ENCODED_SCRIPT|perl -e 'use MIME::Base64 qw(decode_base64); local($/) = undef;print decode_base64(<STDIN>)' >"$tmpfile" echo $ENCODED_SCRIPT|base64 -d >"$tmpfile"
chmod 755 "$tmpfile" chmod 755 "$tmpfile"
DISPLAY=:0 su - user -c "$tmpfile" DISPLAY=:0 su - user -c "$tmpfile"
ret=$? ret=$?