From: Daniel P. Berrange Date: Tue, 8 Oct 2013 15:35:38 +0000 (+0100) Subject: Add logging to LXC cgroup devices setup X-Git-Tag: CVE-2013-4401~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d8afffecd47b360ed8fe82c01c1d902f40f5e68;p=thirdparty%2Flibvirt.git Add logging to LXC cgroup devices setup To facilitate debugging, add some more logging to LXC cgroup devices ACL setup. Signed-off-by: Daniel P. Berrange --- diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 0b0ca02606..275e250263 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -347,6 +347,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def, goto cleanup; } + VIR_DEBUG("Allowing any disk block devs"); for (i = 0; i < def->ndisks; i++) { if (def->disks[i]->type != VIR_DOMAIN_DISK_TYPE_BLOCK) continue; @@ -360,6 +361,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def, goto cleanup; } + VIR_DEBUG("Allowing any filesystem block devs"); for (i = 0; i < def->nfss; i++) { if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_BLOCK) continue; @@ -372,6 +374,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def, goto cleanup; } + VIR_DEBUG("Allowing any hostdev block devs"); for (i = 0; i < def->nhostdevs; i++) { virDomainHostdevDefPtr hostdev = def->hostdevs[i]; virUSBDevicePtr usb; @@ -423,6 +426,8 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def, VIR_CGROUP_DEVICE_RWM) < 0) goto cleanup; + VIR_DEBUG("Device whitelist complete"); + ret = 0; cleanup: return ret;