]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainCreateDeviceRecursive: Don't try to create devices under preserved mount...
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Apr 2017 08:45:45 +0000 (10:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 May 2017 15:23:03 +0000 (17:23 +0200)
commite30dbf35a1a9e86934272aeef803f91b36d8cbce
tree47ee075915a80b77832ed35c0485010da295a148
parent26c14be8d64bc9e3c23b95fff65affc2bf7c86bc
qemuDomainCreateDeviceRecursive: Don't try to create devices under preserved mount points

While the code allows devices to already be there (by some
miracle), we shouldn't try to create devices that don't belong to
us. For instance, we shouldn't try to create /dev/shm/file
because /dev/shm is a mount point that is preserved. Therefore if
a file is created there from an outside (e.g. by mgmt application
or some other daemon running on the system like vhostmd), it
exists in the qemu namespace too as the mount point is the same.
It's only /dev and /dev only that is different. The same
reasoning applies to all other preserved mount points.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
src/qemu/qemu_domain.c