mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
Skip labelling if no src path present
Fixes startup of guest's with sourceless cdrom devices. Patch from Cole Robinson originally posted here: https://bugzilla.redhat.com/499569 but never sent upstream. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
parent
add254feea
commit
67d0c6eb94
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jul 3 11:27:14 GMT 2009 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
|
Patch from Cole Robinson in https://bugzilla.redhat.com/499569
|
||||||
|
|
||||||
|
* src/security_selinux.c: Skip labelling if no src path
|
||||||
|
present
|
||||||
|
|
||||||
Thu Jul 3 11:26:04 GMT 2009 Mark McLoughlin <markmc@redhat.com>
|
Thu Jul 3 11:26:04 GMT 2009 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
Patch from Tim Waugh in https://bugzilla.redhat.com/507555
|
Patch from Tim Waugh in https://bugzilla.redhat.com/507555
|
||||||
|
@ -380,6 +380,9 @@ SELinuxSetSecurityImageLabel(virConnectPtr conn,
|
|||||||
{
|
{
|
||||||
const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
|
const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
|
||||||
|
|
||||||
|
if (!disk->src)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (disk->shared) {
|
if (disk->shared) {
|
||||||
return SELinuxSetFilecon(conn, disk->src, default_image_context);
|
return SELinuxSetFilecon(conn, disk->src, default_image_context);
|
||||||
} else if (disk->readonly) {
|
} else if (disk->readonly) {
|
||||||
|
Loading…
Reference in New Issue
Block a user