security: Re-apply commit ce53382ba2

Recent changes in the security driver discarded changes that fixed
labeling un-confined guests.
This commit is contained in:
Peter Krempa 2012-08-30 16:05:53 +02:00
parent 077e7bf51f
commit 1497e36db9

View File

@ -340,10 +340,12 @@ int virSecurityManagerGenLabel(virSecurityManagerPtr mgr,
} }
if (seclabel->type == VIR_DOMAIN_SECLABEL_DEFAULT) { if (seclabel->type == VIR_DOMAIN_SECLABEL_DEFAULT) {
if (sec_managers[i]->defaultConfined) if (sec_managers[i]->defaultConfined) {
seclabel->type = VIR_DOMAIN_SECLABEL_DYNAMIC; seclabel->type = VIR_DOMAIN_SECLABEL_DYNAMIC;
else } else {
seclabel->type = VIR_DOMAIN_SECLABEL_NONE; seclabel->type = VIR_DOMAIN_SECLABEL_NONE;
seclabel->norelabel = true;
}
} }
if ((seclabel->type == VIR_DOMAIN_SECLABEL_NONE) && if ((seclabel->type == VIR_DOMAIN_SECLABEL_NONE) &&