Merge remote-tracking branch 'qubesos/pr/19'

* qubesos/pr/19:
  qvm-create: Don't allow the user to manually create dispNN names
This commit is contained in:
Marek Marczykowski-Górecki 2016-03-13 03:38:48 +01:00
commit bc1c3c2cc0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -130,6 +130,10 @@ def main():
if options.offline_mode: if options.offline_mode:
vmm.offline_mode = True 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 = QubesVmCollection()
qvm_collection.lock_db_for_writing() qvm_collection.lock_db_for_writing()
qvm_collection.load() qvm_collection.load()