Allow a guest to determine its VM UUID.

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

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2006-05-23 16:23:10 +01:00
1 parent 7bc3fa8ada
commit e73effa056
1 file changed
+10
+10
View File
@@ -701,6 +701,16 @@ class XendDomainInfo:
log.debug("Storing VM details: %s", to_store)
self.writeVm(to_store)
self.setVmPermissions()
def setVmPermissions(self):
"""Allow the guest domain to read its UUID. We don't allow it to
access any other entry, for security."""
xstransact.SetPermissions('%s/uuid' % self.vmpath,
{ 'dom' : self.domid,
'read' : True,
'write' : False })
def storeDomDetails(self):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.