]> git.ipfire.org Git - thirdparty/libvirt.git/commit
selinux: Swap two blocks handling setfilecon_raw() failure
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 20 Sep 2021 10:21:04 +0000 (12:21 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 20 Feb 2023 10:02:51 +0000 (11:02 +0100)
commit466920ea1d64471c9b40dde39506df0eac55a630
treec9e3c322d7c05db2685b57cc51677aec9850e3cc
parent029a892abdb2fe508f3fb77af00a14464b98b824
selinux: Swap two blocks handling setfilecon_raw() failure

In virSecuritySELinuxSetFileconImpl() we have code that handles
setfilecon_raw() failure. The code consists of two blocks: one
for dealing with shared filesystem like NFS (errno is ENOTSUP or
EROFS) and the other block that's dealing with EPERM for
privileged daemon. Well, the order of these two blocks is a bit
confusing because the comment above them mentions the NFS case
but EPERM block follows. Swap these two blocks to make it less
confusing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/security/security_selinux.c