Check name of the VBoxManage executable

Fix #118
This commit is contained in:
Julien Duponchelle committed 2015-04-01 17:36:22 +02:00
1 parent b2d8a8d810
commit 4cd5ec5613
3 files changed
+25 -1

No files matched your search

@@ -73,6 +73,8 @@ class VirtualBox(BaseManager):
raise VirtualBoxError("VBoxManage {} is not accessible".format(vboxmanage_path))
if not os.access(vboxmanage_path, os.X_OK):
raise VirtualBoxError("VBoxManage is not executable")
if os.path.basename(vboxmanage_path) not in ["VBoxManage", "VBoxManage.exe", "vboxmanage"]:
raise VirtualBoxError("Invalid VBoxManage executable name {}".format(os.path.basename(vboxmanage_path)))
self._vboxmanage_path = vboxmanage_path
return vboxmanage_path