]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Skip any files which are not mounted on the host
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Oct 2013 12:12:15 +0000 (13:12 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Nov 2013 07:51:48 +0000 (15:51 +0800)
commit9ecbd38c4c4a582bc17749b97c4641ee80f42d75
tree9a8518a6c461cab15fb9dc3c9b503b8173108c9e
parentbf8874025ee8a8a69951918c67e769a99fa27e07
Skip any files which are not mounted on the host

Currently the LXC container tries to skip selinux/securityfs
mounts if the directory does not exist in the filesystem,
or if SELinux is disabled.

The former check is flawed because the /sys/fs/selinux
or /sys/kernel/securityfs directories may exist in sysfs
even if the mount type is disabled. Instead of just doing
an access() check, use an virFileIsMounted() to see if
the FS is actually present in the host OS. This also
avoids the need to check is_selinux_enabled().

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_container.c