From: "Daniel P. Berrange" <berrange(a)redhat.com>
Insert calls to the ACL checking APIs in all libxl driver
entrypoints.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/libxl/libxl_driver.c | 187 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 184 insertions(+), 3 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 99d2dc4..0bbe8a1 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -45,6 +45,7 @@
#include "virtypedparam.h"
#include "viruri.h"
#include "virstring.h"
+#include "access/viraccessapicheck.h"
#define VIR_FROM_THIS VIR_FROM_LIBXL
@@ -1382,6 +1383,9 @@ libxlConnectOpen(virConnectPtr conn,
}
}
+ if (virConnectOpenEnsureACL(conn) < 0)
+ return VIR_DRV_OPEN_ERROR;
+
conn->privateData = libxl_driver;
return VIR_DRV_OPEN_SUCCESS;
@@ -1395,8 +1399,11 @@ libxlConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
}
static const char *
-libxlConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
+libxlConnectGetType(virConnectPtr conn)
{
+ if (virConnectGetTypeEnsureACL(conn) < 0)
+ return NULL;
+
return "xenlight";
}
@@ -1405,6 +1412,9 @@ libxlConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
libxlDriverPrivatePtr driver = conn->privateData;
+ if (virConnectGetVersionEnsureACL(conn) < 0)
+ return 0;
+
libxlDriverLock(driver);
*version = driver->version;
libxlDriverUnlock(driver);
@@ -1412,8 +1422,11 @@ libxlConnectGetVersion(virConnectPtr conn, unsigned long *version)
}
-static char *libxlConnectGetHostname(virConnectPtr conn ATTRIBUTE_UNUSED)
+static char *libxlConnectGetHostname(virConnectPtr conn)
{
+ if (virConnectGetHostnameEnsureACL(conn) < 0)
+ return NULL;
+
return virGetHostname();
}
@@ -1424,6 +1437,9 @@ libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type
ATTRIBUTE_UNUSED)
int ret;
libxlDriverPrivatePtr driver = conn->privateData;
+ if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
+ return -1;
+
ret = libxl_get_max_cpus(driver->ctx);
/* libxl_get_max_cpus() will return 0 if there were any failures,
e.g. xc_physinfo() failing */
@@ -1436,6 +1452,9 @@ libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type
ATTRIBUTE_UNUSED)
static int
libxlNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
{
+ if (virNodeGetInfoEnsureACL(conn) < 0)
+ return -1;
+
return libxlDoNodeGetInfo(conn->privateData, info);
}
@@ -1445,6 +1464,9 @@ libxlConnectGetCapabilities(virConnectPtr conn)
libxlDriverPrivatePtr driver = conn->privateData;
char *xml;
+ if (virConnectGetCapabilitiesEnsureACL(conn) < 0)
+ return NULL;
+
libxlDriverLock(driver);
if ((xml = virCapabilitiesFormatXML(driver->caps)) == NULL)
virReportOOMError();
@@ -1459,6 +1481,9 @@ libxlConnectListDomains(virConnectPtr conn, int *ids, int nids)
libxlDriverPrivatePtr driver = conn->privateData;
int n;
+ if (virConnectListDomainsEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
n = virDomainObjListGetActiveIDs(driver->domains, ids, nids);
libxlDriverUnlock(driver);
@@ -1472,6 +1497,9 @@ libxlConnectNumOfDomains(virConnectPtr conn)
libxlDriverPrivatePtr driver = conn->privateData;
int n;
+ if (virConnectNumOfDomainsEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
n = virDomainObjListNumOfDomains(driver->domains, 1);
libxlDriverUnlock(driver);
@@ -1496,6 +1524,9 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
+ if (virDomainCreateXMLEnsureACL(conn, def) < 0)
+ goto cleanup;
+
if (!(vm = virDomainObjListAdd(driver->domains, def,
driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -1538,6 +1569,9 @@ libxlDomainLookupByID(virConnectPtr conn, int id)
goto cleanup;
}
+ if (virDomainLookupByIDEnsureACL(conn, vm->def) < 0)
+ goto cleanup;
+
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom)
dom->id = vm->def->id;
@@ -1564,6 +1598,9 @@ libxlDomainLookupByUUID(virConnectPtr conn, const unsigned char
*uuid)
goto cleanup;
}
+ if (virDomainLookupByUUIDEnsureACL(conn, vm->def) < 0)
+ goto cleanup;
+
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom)
dom->id = vm->def->id;
@@ -1590,6 +1627,9 @@ libxlDomainLookupByName(virConnectPtr conn, const char *name)
goto cleanup;
}
+ if (virDomainLookupByNameEnsureACL(conn, vm->def) < 0)
+ goto cleanup;
+
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom)
dom->id = vm->def->id;
@@ -1620,6 +1660,10 @@ libxlDomainSuspend(virDomainPtr dom)
_("No domain with matching uuid '%s'"),
uuidstr);
goto cleanup;
}
+
+ if (virDomainSuspendEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -1679,6 +1723,9 @@ libxlDomainResume(virDomainPtr dom)
goto cleanup;
}
+ if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -1737,6 +1784,9 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainShutdownFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("Domain is not running"));
@@ -1790,6 +1840,9 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainRebootEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("Domain is not running"));
@@ -1833,6 +1886,9 @@ libxlDomainDestroyFlags(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("Domain is not running"));
@@ -1888,7 +1944,11 @@ libxlDomainGetOSType(virDomainPtr dom)
goto cleanup;
}
- ignore_value(VIR_STRDUP(type, vm->def->os.type));
+ if (virDomainGetOSTypeEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ if (VIR_STRDUP(type, vm->def->os.type) < 0)
+ goto cleanup;
cleanup:
if (vm)
@@ -1911,6 +1971,10 @@ libxlDomainGetMaxMemory(virDomainPtr dom)
virReportError(VIR_ERR_NO_DOMAIN, "%s", _("no domain with matching
uuid"));
goto cleanup;
}
+
+ if (virDomainGetMaxMemoryEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
ret = vm->def->mem.max_balloon;
cleanup:
@@ -1943,6 +2007,9 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
goto cleanup;
}
+ if (virDomainSetMemoryFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
isActive = virDomainObjIsActive(vm);
if (flags == VIR_DOMAIN_MEM_CURRENT) {
@@ -2065,6 +2132,9 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
goto cleanup;
}
+ if (virDomainGetInfoEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
info->cpuTime = 0;
info->memory = vm->def->mem.cur_balloon;
@@ -2112,6 +2182,9 @@ libxlDomainGetState(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainGetStateEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
*state = virDomainObjGetState(vm, reason);
ret = 0;
@@ -2224,6 +2297,9 @@ libxlDomainSaveFlags(virDomainPtr dom, const char *to, const char
*dxml,
goto cleanup;
}
+ if (virDomainSaveFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -2276,6 +2352,9 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
if (fd < 0)
goto cleanup;
+ if (virDomainRestoreFlagsEnsureACL(conn, def) < 0)
+ goto cleanup;
+
if (!(vm = virDomainObjListAdd(driver->domains, def,
driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
@@ -2331,6 +2410,9 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int
flags)
goto cleanup;
}
+ if (virDomainCoreDumpEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -2421,6 +2503,9 @@ libxlDomainManagedSave(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainManagedSaveEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -2496,6 +2581,9 @@ libxlDomainHasManagedSaveImage(virDomainPtr dom, unsigned int
flags)
goto cleanup;
}
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
ret = vm->hasManagedSave;
cleanup:
@@ -2525,6 +2613,9 @@ libxlDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainManagedSaveRemoveEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
name = libxlDomainManagedSavePath(driver, vm);
if (name == NULL)
goto cleanup;
@@ -2583,6 +2674,9 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
goto cleanup;
}
+ if (virDomainSetVcpusFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm) && (flags & VIR_DOMAIN_VCPU_LIVE)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot set vcpus on an inactive domain"));
@@ -2702,6 +2796,9 @@ libxlDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainGetVcpusFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
active = virDomainObjIsActive(vm);
if ((flags & (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG)) == 0) {
@@ -2759,6 +2856,9 @@ libxlDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, unsigned
char *cpumap,
goto cleanup;
}
+ if (virDomainPinVcpuEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot pin vcpus on an inactive domain"));
@@ -2826,6 +2926,9 @@ libxlDomainGetVcpus(virDomainPtr dom, virVcpuInfoPtr info, int
maxinfo,
goto cleanup;
}
+ if (virDomainGetVcpusEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -2890,6 +2993,9 @@ libxlDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
goto cleanup;
}
+ if (virDomainGetXMLDescEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
ret = virDomainDefFormat(vm->def, flags);
cleanup:
@@ -2911,6 +3017,9 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, const char *
nativeFormat,
virCheckFlags(0, NULL);
+ if (virConnectDomainXMLFromNativeEnsureACL(conn) < 0)
+ goto cleanup;
+
if (STRNEQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) {
virReportError(VIR_ERR_INVALID_ARG,
_("unsupported config type %s"), nativeFormat);
@@ -2954,6 +3063,9 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char *
nativeFormat,
virCheckFlags(0, NULL);
+ if (virConnectDomainXMLToNativeEnsureACL(conn) < 0)
+ goto cleanup;
+
if (STRNEQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) {
virReportError(VIR_ERR_INVALID_ARG,
_("unsupported config type %s"), nativeFormat);
@@ -2997,6 +3109,9 @@ libxlConnectListDefinedDomains(virConnectPtr conn,
libxlDriverPrivatePtr driver = conn->privateData;
int n;
+ if (virConnectListDefinedDomainsEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
n = virDomainObjListGetInactiveNames(driver->domains, names, nnames);
libxlDriverUnlock(driver);
@@ -3009,6 +3124,9 @@ libxlConnectNumOfDefinedDomains(virConnectPtr conn)
libxlDriverPrivatePtr driver = conn->privateData;
int n;
+ if (virConnectNumOfDefinedDomainsEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
n = virDomainObjListNumOfDomains(driver->domains, 0);
libxlDriverUnlock(driver);
@@ -3036,6 +3154,9 @@ libxlDomainCreateWithFlags(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("Domain is already running"));
@@ -3073,6 +3194,9 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
+ if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+ goto cleanup;
+
if (!(vm = virDomainObjListAdd(driver->domains, def,
driver->xmlopt,
0,
@@ -3132,6 +3256,9 @@ libxlDomainUndefineFlags(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainUndefineFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!vm->persistent) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("cannot undefine transient domain"));
@@ -3561,6 +3688,9 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
}
+ if (virDomainAttachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
if (virDomainObjIsActive(vm)) {
if (flags == VIR_DOMAIN_DEVICE_MODIFY_CURRENT)
flags |= VIR_DOMAIN_DEVICE_MODIFY_LIVE;
@@ -3666,6 +3796,9 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
}
+ if (virDomainDetachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
if (virDomainObjIsActive(vm)) {
if (flags == VIR_DOMAIN_DEVICE_MODIFY_CURRENT)
flags |= VIR_DOMAIN_DEVICE_MODIFY_LIVE;
@@ -3771,6 +3904,9 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
}
+ if (virDomainUpdateDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
if (virDomainObjIsActive(vm)) {
if (flags == VIR_DOMAIN_DEVICE_MODIFY_CURRENT)
flags |= VIR_DOMAIN_DEVICE_MODIFY_LIVE;
@@ -3854,6 +3990,9 @@ libxlNodeGetFreeMemory(virConnectPtr conn)
const libxl_version_info* ver_info;
libxlDriverPrivatePtr driver = conn->privateData;
+ if (virNodeGetFreeMemoryEnsureACL(conn) < 0)
+ return 0;
+
if (libxl_get_physinfo(driver->ctx, &phy_info)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("libxl_get_physinfo_info failed"));
@@ -3877,6 +4016,9 @@ libxlConnectDomainEventRegister(virConnectPtr conn,
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
+ if (virConnectDomainEventRegisterEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
ret = virDomainEventStateRegister(conn,
driver->domainEventState,
@@ -3894,6 +4036,9 @@ libxlConnectDomainEventDeregister(virConnectPtr conn,
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
+ if (virConnectDomainEventDeregisterEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
ret = virDomainEventStateDeregister(conn,
driver->domainEventState,
@@ -3922,6 +4067,9 @@ libxlDomainGetAutostart(virDomainPtr dom, int *autostart)
goto cleanup;
}
+ if (virDomainGetAutostartEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
*autostart = vm->autostart;
ret = 0;
@@ -3950,6 +4098,9 @@ libxlDomainSetAutostart(virDomainPtr dom, int autostart)
goto cleanup;
}
+ if (virDomainSetAutostartEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!vm->persistent) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("cannot set autostart for transient
domain"));
@@ -4019,6 +4170,9 @@ libxlDomainGetSchedulerType(virDomainPtr dom, int *nparams)
goto cleanup;
}
+ if (virDomainGetSchedulerTypeEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -4084,6 +4238,9 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainGetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Domain is not running"));
@@ -4166,6 +4323,9 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
goto cleanup;
}
+ if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def, flags)
< 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain is not
running"));
goto cleanup;
@@ -4234,6 +4394,10 @@ libxlDomainIsActive(virDomainPtr dom)
virReportError(VIR_ERR_NO_DOMAIN, NULL);
goto cleanup;
}
+
+ if (virDomainIsActiveEnsureACL(dom->conn, obj->def) < 0)
+ goto cleanup;
+
ret = virDomainObjIsActive(obj);
cleanup:
@@ -4256,6 +4420,10 @@ libxlDomainIsPersistent(virDomainPtr dom)
virReportError(VIR_ERR_NO_DOMAIN, NULL);
goto cleanup;
}
+
+ if (virDomainIsPersistentEnsureACL(dom->conn, obj->def) < 0)
+ goto cleanup;
+
ret = obj->persistent;
cleanup:
@@ -4278,6 +4446,10 @@ libxlDomainIsUpdated(virDomainPtr dom)
virReportError(VIR_ERR_NO_DOMAIN, NULL);
goto cleanup;
}
+
+ if (virDomainIsUpdatedEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
ret = vm->updated;
cleanup:
@@ -4294,6 +4466,9 @@ libxlConnectDomainEventRegisterAny(virConnectPtr conn, virDomainPtr
dom, int eve
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
+ if (virConnectDomainEventRegisterAnyEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
if (virDomainEventStateRegisterID(conn,
driver->domainEventState,
@@ -4312,6 +4487,9 @@ libxlConnectDomainEventDeregisterAny(virConnectPtr conn, int
callbackID)
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
+ if (virConnectDomainEventDeregisterAnyEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
ret = virDomainEventStateDeregisterID(conn,
driver->domainEventState,
@@ -4338,6 +4516,9 @@ libxlConnectListAllDomains(virConnectPtr conn,
virCheckFlags(VIR_CONNECT_LIST_DOMAINS_FILTERS_ALL, -1);
+ if (virConnectListAllDomainsEnsureACL(conn) < 0)
+ return -1;
+
libxlDriverLock(driver);
ret = virDomainObjListExport(driver->domains, conn, domains, flags);
libxlDriverUnlock(driver);
--
1.8.1.4