[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: Do not trust frontend for nic in libxl_devid_to_device_nic
commit 7e03b128e0347b83f2b81697e2ad1e17c0682727 Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> AuthorDate: Tue May 3 15:52:53 2016 +0100 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Thu Jun 2 15:53:28 2016 +0100 libxl: Do not trust frontend for nic in libxl_devid_to_device_nic Find the backend by reading the pointer in /libxl rather than in the guest's frontend area. This is part of XSA-175. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 3c8ed64..aa6b33d 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -3629,16 +3629,16 @@ int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid, int devid, libxl_device_nic *nic) { GC_INIT(ctx); - char *dompath, *path; + char *libxl_dom_path, *path; int rc = ERROR_FAIL; libxl_device_nic_init(nic); - dompath = libxl__xs_get_dompath(gc, domid); - if (!dompath) + libxl_dom_path = libxl__xs_libxl_path(gc, domid); + if (!libxl_dom_path) goto out; path = libxl__xs_read(gc, XBT_NULL, - GCSPRINTF("%s/device/vif/%d/backend", dompath, + GCSPRINTF("%s/device/vif/%d/backend", libxl_dom_path, devid)); if (!path) goto out; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |