debuggers.hg

changeset 20932:2a775968c7a1

xend: Disallow "/" in domain names

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 03 09:45:02 2010 +0000 (2010-02-03)
parents 39424ff0c91c
children b48b5e688470
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Feb 03 09:44:12 2010 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Feb 03 09:45:02 2010 +0000
     1.3 @@ -3472,7 +3472,7 @@ class XendDomainInfo:
     1.4  
     1.5      def _checkName(self, name):
     1.6          """Check if a vm name is valid. Valid names contain alphabetic
     1.7 -        characters, digits, or characters in '_-.:/+'.
     1.8 +        characters, digits, or characters in '_-.:+'.
     1.9          The same name cannot be used for more than one vm at the same time.
    1.10  
    1.11          @param name: name
    1.12 @@ -3483,7 +3483,7 @@ class XendDomainInfo:
    1.13          if name is None or name == '':
    1.14              raise VmError('Missing VM Name')
    1.15  
    1.16 -        if not re.search(r'^[A-Za-z0-9_\-\.\:\/\+]+$', name):
    1.17 +        if not re.search(r'^[A-Za-z0-9_\-\.\:\+]+$', name):
    1.18              raise VmError('Invalid VM Name')
    1.19  
    1.20          dom =  XendDomain.instance().domain_lookup_nr(name)