mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
7bc3fa8ada
commit
e73effa056
1 file changed
+10
@@ -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):
|
||||
|
||||