mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
security: Drop virSecurityManagerSetHugepages
Since its introduction in 2012 this internal API did nothing. Moreover we have the same API that does exactly the same: virSecurityManagerDomainSetPathLabel. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f55afd83b1
commit
ce937d3710
@ -1164,7 +1164,6 @@ virSecurityManagerSetChildProcessLabel;
|
||||
virSecurityManagerSetDaemonSocketLabel;
|
||||
virSecurityManagerSetDiskLabel;
|
||||
virSecurityManagerSetHostdevLabel;
|
||||
virSecurityManagerSetHugepages;
|
||||
virSecurityManagerSetImageFDLabel;
|
||||
virSecurityManagerSetImageLabel;
|
||||
virSecurityManagerSetProcessLabel;
|
||||
|
@ -3250,8 +3250,8 @@ qemuProcessBuildDestroyHugepagesPath(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virSecurityManagerSetHugepages(driver->securityManager,
|
||||
vm->def, hugepagePath) < 0) {
|
||||
if (virSecurityManagerDomainSetPathLabel(driver->securityManager,
|
||||
vm->def, hugepagePath) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Unable to set huge path in security driver"));
|
||||
goto cleanup;
|
||||
|
@ -168,7 +168,6 @@ struct _virSecurityDriver {
|
||||
virSecurityDomainSetTapFDLabel domainSetSecurityTapFDLabel;
|
||||
|
||||
virSecurityDomainGetMountOptions domainGetSecurityMountOptions;
|
||||
virSecurityDomainSetHugepages domainSetSecurityHugepages;
|
||||
|
||||
virSecurityDriverGetBaseLabel getBaseLabel;
|
||||
|
||||
|
@ -969,23 +969,6 @@ virSecurityManagerGetNested(virSecurityManagerPtr mgr)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
virSecurityManagerSetHugepages(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
const char *path)
|
||||
{
|
||||
if (mgr->drv->domainSetSecurityHugepages) {
|
||||
int ret;
|
||||
virObjectLock(mgr);
|
||||
ret = mgr->drv->domainSetSecurityHugepages(mgr, vm, path);
|
||||
virObjectUnlock(mgr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
virSecurityManagerDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
|
@ -149,9 +149,6 @@ int virSecurityManagerSetTapFDLabel(virSecurityManagerPtr mgr,
|
||||
char *virSecurityManagerGetMountOptions(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm);
|
||||
virSecurityManagerPtr* virSecurityManagerGetNested(virSecurityManagerPtr mgr);
|
||||
int virSecurityManagerSetHugepages(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr sec,
|
||||
const char *hugepages_path);
|
||||
|
||||
int virSecurityManagerSetImageLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
|
@ -511,23 +511,6 @@ virSecurityStackSetTapFDLabel(virSecurityManagerPtr mgr,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
virSecurityStackSetHugepages(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
const char *path)
|
||||
{
|
||||
virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||
virSecurityStackItemPtr item = priv->itemsHead;
|
||||
int rc = 0;
|
||||
|
||||
for (; item; item = item->next) {
|
||||
if (virSecurityManagerSetHugepages(item->securityManager, vm, path) < 0)
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static char *
|
||||
virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
||||
virDomainDefPtr vm ATTRIBUTE_UNUSED)
|
||||
@ -663,8 +646,6 @@ virSecurityDriver virSecurityDriverStack = {
|
||||
|
||||
.domainGetSecurityMountOptions = virSecurityStackGetMountOptions,
|
||||
|
||||
.domainSetSecurityHugepages = virSecurityStackSetHugepages,
|
||||
|
||||
.getBaseLabel = virSecurityStackGetBaseLabel,
|
||||
|
||||
.domainSetPathLabel = virSecurityStackDomainSetPathLabel,
|
||||
|
Loading…
Reference in New Issue
Block a user