mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
selinux: fix wrong tapfd relablling
It should relabel tapfd of virtual network of type VIR_DOMAIN_NET_TYPE_DIRECT
rather than VIR_DOMAIN_NET_TYPE_NETWORK and VIR_DOMAIN_NET_TYPE_BRIDGE
(commit ae368ebfcc
introduced this bug)
Caution: The context of the two hunks is identical other than indentation.
Please be extremely cautious of where the patch gets applied.
This commit is contained in:
parent
9f0e9cba27
commit
89b63f0ad4
@ -5412,10 +5412,6 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
if (tapfd < 0)
|
||||
goto error;
|
||||
|
||||
if (virSecurityManagerSetTapFDLabel(driver->securityManager,
|
||||
def, tapfd) < 0)
|
||||
goto error;
|
||||
|
||||
last_good_net = i;
|
||||
virCommandTransferFD(cmd, tapfd);
|
||||
|
||||
@ -5429,6 +5425,10 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
if (tapfd < 0)
|
||||
goto error;
|
||||
|
||||
if (virSecurityManagerSetTapFDLabel(driver->securityManager,
|
||||
def, tapfd) < 0)
|
||||
goto error;
|
||||
|
||||
last_good_net = i;
|
||||
virCommandTransferFD(cmd, tapfd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user