]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix path used for USB device attach with LXC
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 4 Feb 2014 16:43:18 +0000 (16:43 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 16:34:06 +0000 (16:34 +0000)
commit17fc85a20a5023555d22a6cf42784b7018bfa7ad
tree19373ca456fbc4793908f8ecf3838530197711fc
parent9bb26f0909a711083ac23f93f0e714fec081b7af
Fix path used for USB device attach with LXC

The LXC code missed the 'usb' component out of the path
/dev/bus/usb/$BUSNUM/$DEVNUM, so it failed to actually
setup cgroups for the device. This was in fact lucky
because the call to virLXCSetupHostUsbDeviceCgroup
was also mistakenly passing '&priv->cgroup' instead of
just 'priv->cgroup'. So once the path is fixed, libvirtd
would then crash trying to access the bogus virCgroupPtr
pointer. This would have been a security issue, were it
not for the bogus path preventing the pointer reference
being reached.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit c3648972222d4eb056e6e667c193ba56a7aa3557)
src/lxc/lxc_driver.c