Forbid creating VM with name 'none' or 'default'

Those were special names in Qubes 3.x, don't allow such VMs to avoid
(potentially fatal) confusion.

Fixes QubesOS/qubes-issues#3002
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-13 21:11:45 +02:00
parent 10c6697050
commit 9f7915d998
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -60,6 +60,9 @@ def validate_name(holder, prop, value):
else:
raise qubes.exc.QubesValueError(
'VM name contains illegal characters')
if value in ('none', 'default'):
raise qubes.exc.QubesValueError(
'VM name cannot be \'none\' nor \'default\'')
class Features(dict):