qvm-create: Don't allow the user to manually create dispNN names

This commit is contained in:
Jon Griffiths 2016-03-03 13:42:13 +13:00
parent fa66fec684
commit 4dd87f2683

View File

@ -130,6 +130,10 @@ def main():
if options.offline_mode:
vmm.offline_mode = True
if re.match('^disp\d+$', vmname):
print >> sys.stderr, 'The name "{0}" is reserved for internal use.'.format(vmname)
exit(1)
qvm_collection = QubesVmCollection()
qvm_collection.lock_db_for_writing()
qvm_collection.load()