]> git.ipfire.org Git - thirdparty/libvirt.git/commit
selinux: Drop needless getfilecon()-s
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Nov 2019 08:37:22 +0000 (09:37 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 3 Dec 2019 07:34:09 +0000 (08:34 +0100)
commit087fac8fa7b1624aba40f0f881a458bdedcc022c
tree6b133d534db26bdcf9755f598d7a54a49d2a4d5d
parente8a8ee92bd71bb70b0eff3571e8be92692875a7d
selinux: Drop needless getfilecon()-s

When SELinux support was first introduced the libselinux library
wasn't that advanced and setfilecon_raw() or fsetfilecon_raw()
could fail even when the target context was set. Looking at the
current code [1][2] this is no longer the case. We can drop our
workarounds.

1: https://github.com/SELinuxProject/selinux/blob/master/libselinux/src/setfilecon.c#L10
2: https://github.com/SELinuxProject/selinux/blob/master/libselinux/src/fsetfilecon.c#L10

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/security/security_selinux.c