mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-22 14:09:22 +00:00
selinux: Properly check TAP FD label
After a4431931
the TAP FDs ale labeled with image label instead
of the process label. On the other hand, the commit was
incomplete as a few lines above, there's still old check for the
process label presence while it should be check for the image
label instead.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6c555027dd
commit
b635b7a1af
@ -2347,7 +2347,7 @@ virSecuritySELinuxSetTapFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
||||
virSecurityLabelDefPtr secdef;
|
||||
|
||||
secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
|
||||
if (!secdef || !secdef->label)
|
||||
if (!secdef || !secdef->imagelabel)
|
||||
return 0;
|
||||
|
||||
return virSecuritySELinuxFSetFilecon(fd, secdef->imagelabel);
|
||||
|
Loading…
Reference in New Issue
Block a user