]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security: selinux: Simplify SetImageLabelInternal
authorCole Robinson <crobinso@redhat.com>
Sat, 5 Oct 2019 14:24:44 +0000 (10:24 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 11 Oct 2019 18:25:59 +0000 (14:25 -0400)
commit6f1cd0a54e05552e089948735778f245b0593392
tree573dcdf8d5b563ab76aac2b1833726d67e229d26
parentefe3575e60697ac8e55e16393b9e7cc56af598d5
security: selinux: Simplify SetImageLabelInternal

All the SetFileCon calls only differ by the label they pass in.
Rework the conditionals to track what label we need, and use a
single SetFileCon call

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/security/security_selinux.c