From 97aa4ed9cb27be470a0c4f64be583eac4d9692e7 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 13 Nov 2012 04:28:09 +0100 Subject: [PATCH] dom0/core: API CHANGE: pass username as keyword param to vm.run() (#577) Get rid of ugly embedding username into commandline. This will make much easier avoid hardcoding username in dom0 code. Currently dom0 is free of hardcoded "user" username ("root" still is used). --- misc/xl-qvm-usb-attach.py | 2 +- misc/xl-qvm-usb-detach.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/xl-qvm-usb-attach.py b/misc/xl-qvm-usb-attach.py index e854229..58ac2a8 100755 --- a/misc/xl-qvm-usb-attach.py +++ b/misc/xl-qvm-usb-attach.py @@ -45,4 +45,4 @@ else: qvm_collection.unlock_db() # launch - qvm_collection.get_vm_by_name(backendvm_name).run("root: %s" % cmd) + qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root") diff --git a/misc/xl-qvm-usb-detach.py b/misc/xl-qvm-usb-detach.py index 478d8bb..e32fe47 100755 --- a/misc/xl-qvm-usb-detach.py +++ b/misc/xl-qvm-usb-detach.py @@ -41,7 +41,7 @@ else: qvm_collection.unlock_db() # launch - qvm_collection.get_vm_by_name(backendvm_name).run("root: %s" % cmd) + qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root") # FIXME: command injection os.system("xenstore-write /local/domain/%s/backend/vusb/%s/%s/port/%s ''"