[libvirt] [PATCH] virSecuritySELinuxSetFileconHelper: Don't fail on read-only NFS

Jiri Denemark jdenemar at redhat.com
Fri Jan 17 12:57:35 UTC 2014

On Fri, Jan 17, 2014 at 13:43:40 +0100, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=996543
> When starting up a domain, the SELinux labeling is done depending on
> current configuration. If the labeling fails we check for possible
> causes, as not all labeling failures are fatal. For example, if the
> labeled file is on NFS which lacks SELinux support, the file can still
> be readable to qemu process. These cases are distinguished by the errno
> code: NFS without SELinux support returns EOPNOTSUPP. However, we were
> missing one scenario. In case there's a read-only disk on a read-only
> NFS (and possibly any FS) and the labeling is just optional (not
> explicitly requested in the XML) there's no need to make the labeling
> error fatal. In other words, read-only file on read-only NFS can fail to
> be labeled, but be readable at the same time.
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/security/security_selinux.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)



More information about the libvir-list mailing list