ia64/xen-unstable

changeset 17380:9a4c6b6a801d

xend, acm: Prevent labeling of vlans with the same color

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 03 11:32:20 2008 +0100 (2008-04-03)
parents fedb66235136
children 522f64fbb8bf
files tools/python/xen/util/xsm/acm/acm.py
line diff
     1.1 --- a/tools/python/xen/util/xsm/acm/acm.py	Thu Apr 03 11:24:20 2008 +0100
     1.2 +++ b/tools/python/xen/util/xsm/acm/acm.py	Thu Apr 03 11:32:20 2008 +0100
     1.3 @@ -1220,6 +1220,9 @@ def set_resource_label(resource, policyt
     1.4                  return -xsconstants.XSERR_BAD_LABEL
     1.5              if tmp[2] != oreslabel:
     1.6                  return -xsconstants.XSERR_BAD_LABEL
     1.7 +        if resource.startswith('vlan:'):
     1.8 +            if tuple([policytype, policyref, reslabel]) in access_control.values():
     1.9 +                return -xsconstants.XSERR_BAD_LABEL
    1.10          if reslabel != "":
    1.11              new_entry = { resource : tuple([policytype, policyref, reslabel])}
    1.12              access_control.update(new_entry)