Don't pass untrusted arguments to xm info.
[invirt/packages/invirt-remote.git] / host / usr / sbin / invirt-remote
index 8511f60..dcac451 100755 (executable)
@@ -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" "$@"