]> xenbits.xensource.com Git - libvirt.git/commit
qemuDomainCreateDevice: Canonicalize paths
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Jan 2017 16:32:46 +0000 (17:32 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Jan 2017 17:08:13 +0000 (18:08 +0100)
commitcbc45525cb21988599c5eb58c31ef858e401a465
treebcf1c092a6ea4467200f1e07e03890fd987dcca7
parent49f326edc0f97e2fab00fd6d76fe792d0e078368
qemuDomainCreateDevice: Canonicalize paths

So far the decision whether /dev/* entry is created in the qemu
namespace is really simple: does the path starts with "/dev/"?
This can be easily fooled by providing path like the following
(for any considered device like disk, rng, chardev, ..):

  /dev/../var/lib/libvirt/images/disk.qcow2

Therefore, before making the decision the path should be
canonicalized.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c