direct-io.hg

changeset 10143:187180382772

Allow a guest to determine its VM UUID.

Use xenstore-read $(xenstore-read vm)/uuid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Tue May 23 16:23:10 2006 +0100 (2006-05-23)
parents d809359ab32d
children 1345b20cca56
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue May 23 16:17:28 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue May 23 16:23:10 2006 +0100
     1.3 @@ -701,6 +701,16 @@ class XendDomainInfo:
     1.4          log.debug("Storing VM details: %s", to_store)
     1.5  
     1.6          self.writeVm(to_store)
     1.7 +        self.setVmPermissions()
     1.8 +
     1.9 +
    1.10 +    def setVmPermissions(self):
    1.11 +        """Allow the guest domain to read its UUID.  We don't allow it to
    1.12 +        access any other entry, for security."""
    1.13 +        xstransact.SetPermissions('%s/uuid' % self.vmpath,
    1.14 +                                  { 'dom' : self.domid,
    1.15 +                                    'read' : True,
    1.16 +                                    'write' : False })
    1.17  
    1.18  
    1.19      def storeDomDetails(self):