mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
Generate a valid imagelabel even for type 'none'
Commit 2ce63c1 added imagelabel generation when relabeling is turned off. But we weren't filling out the sensitivity for type 'none' labels, resulting in an invalid label: $ virsh managedsave domain error: unable to set security context 'system_u:object_r:svirt_image_t' on fd 28: Invalid argument
This commit is contained in:
parent
f34ea654de
commit
0db9b0883c
@ -670,7 +670,14 @@ virSecuritySELinuxGenSecurityLabel(virSecurityManagerPtr mgr,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_SECLABEL_NONE:
|
||||
/* no op */
|
||||
if (virSecuritySELinuxMCSGetProcessRange(&sens,
|
||||
&catMin,
|
||||
&catMax) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (VIR_STRDUP(mcs, sens) < 0)
|
||||
goto cleanup;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user