cbc4552 qemuDomainCreateDevice: Canonicalize paths

Authored and Committed by mprivozn 7 years ago
    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>
    
        
file modified
+21 -12