mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: Do not trust backend for vtpm in getinfo (uuid)
Use uuid from /libxl, rather than from backend. I think the backend is not supposed to change the uuid, since it seems to be set by libxl during setup. If in fact the backend is supposed to be able to change the uuid, this patch needs to be dropped and replaced by a patch which makes the vtpm uuid lookup tolerate bad or missing data. This is part of XSA-178. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
a08f74f621
commit
4cfca3a840
1 file changed
+2
-2
+2
-2
@@ -2223,7 +2223,7 @@ libxl_device_vtpm *libxl_device_vtpm_list(libxl_ctx *ctx, uint32_t domid, int *n
|
||||
&vtpm->backend_domid);
|
||||
if (rc) return NULL;
|
||||
|
||||
tmp = libxl__xs_read(gc, XBT_NULL, GCSPRINTF("%s/uuid", be_path));
|
||||
tmp = libxl__xs_read(gc, XBT_NULL, GCSPRINTF("%s/uuid", libxl_path));
|
||||
if (tmp) {
|
||||
if(libxl_uuid_from_string(&(vtpm->uuid), tmp)) {
|
||||
LOG(ERROR, "%s/uuid is a malformed uuid?? (%s) Probably a bug!!\n", be_path, tmp);
|
||||
@@ -2283,7 +2283,7 @@ int libxl_device_vtpm_getinfo(libxl_ctx *ctx,
|
||||
vtpminfo->frontend_id = domid;
|
||||
|
||||
val = libxl__xs_read(gc, XBT_NULL,
|
||||
GCSPRINTF("%s/uuid", vtpminfo->backend));
|
||||
GCSPRINTF("%s/uuid", libxl_path));
|
||||
if(val == NULL) {
|
||||
LOG(ERROR, "%s/uuid does not exist!", vtpminfo->backend);
|
||||
goto err;
|
||||
|
||||