From: Evan Broder Date: Thu, 5 Feb 2009 08:19:21 +0000 (-0500) Subject: Don't pass untrusted arguments to xm info. X-Git-Tag: 0.3.3~7 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/commitdiff_plain/d9bf37acde985cbe8366c52a528809a0ae078a3f?hp=0966a22887e0e26fdc73701165a00ae0e3a5210c Don't pass untrusted arguments to xm info. svn path=/trunk/packages/invirt-remote/; revision=2093 --- diff --git a/debian/changelog b/debian/changelog index 31aa76a..fbf50b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-remote (0.3.2) unstable; urgency=low + + * Don't pass untrusted arguments to xm info. + * Exit with a non-0 error code on the host if there's an error. + + -- Evan Broder Sat, 31 Jan 2009 03:51:24 -0500 + invirt-remote (0.3.1) unstable; urgency=low * invirt.remote.bcast: provide stderr text when remctl fails diff --git a/host/usr/sbin/invirt-remote b/host/usr/sbin/invirt-remote index 8511f60..dcac451 100755 --- a/host/usr/sbin/invirt-remote +++ b/host/usr/sbin/invirt-remote @@ -21,7 +21,7 @@ case "$TYPE" in COMMAND=/usr/sbin/invirt-listvms ;; info) - COMMAND=/usr/sbin/xm + exec /usr/sbin/xm info ;; vnccert) COMMAND=/usr/bin/invirt-vnc-getcert @@ -38,4 +38,4 @@ case "$TYPE" in ;; esac -$COMMAND "$SERVICE" "$@" +exec "$COMMAND" "$SERVICE" "$@" diff --git a/host/usr/sbin/invirt-vmcontrol b/host/usr/sbin/invirt-vmcontrol index 70bff12..9080dfc 100755 --- a/host/usr/sbin/invirt-vmcontrol +++ b/host/usr/sbin/invirt-vmcontrol @@ -12,6 +12,10 @@ ORIGMACHINE="$1" ACTION="$2" MACHINE="d_$ORIGMACHINE" +xm () { + command xm "$@" || exit 35 +} + case "$ACTION" in list|vcpu-list|uptime) xm "$ACTION" "$MACHINE"