mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
security: Rename DomainSetDirLabel to DomainSetPathLabel
It already labels abritrary paths, so it's just the naming that was wrong. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
dd1400280e
commit
32f3f0835e
@ -1055,7 +1055,7 @@ virSecurityDriverLookup;
|
||||
# security/security_manager.h
|
||||
virSecurityManagerCheckAllLabel;
|
||||
virSecurityManagerClearSocketLabel;
|
||||
virSecurityManagerDomainSetDirLabel;
|
||||
virSecurityManagerDomainSetPathLabel;
|
||||
virSecurityManagerGenLabel;
|
||||
virSecurityManagerGetBaseLabel;
|
||||
virSecurityManagerGetDOI;
|
||||
|
@ -527,7 +527,7 @@ qemuDomainWriteMasterKeyFile(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virSecurityManagerDomainSetDirLabel(driver->securityManager,
|
||||
if (virSecurityManagerDomainSetPathLabel(driver->securityManager,
|
||||
vm->def, path) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -4486,7 +4486,7 @@ qemuProcessMakeDir(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virSecurityManagerDomainSetDirLabel(driver->securityManager,
|
||||
if (virSecurityManagerDomainSetPathLabel(driver->securityManager,
|
||||
vm->def, path) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ virSecurityDACGetBaseLabel(virSecurityManagerPtr mgr,
|
||||
}
|
||||
|
||||
static int
|
||||
virSecurityDACDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
virSecurityDACDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
const char *path)
|
||||
{
|
||||
@ -1607,5 +1607,5 @@ virSecurityDriver virSecurityDriverDAC = {
|
||||
|
||||
.getBaseLabel = virSecurityDACGetBaseLabel,
|
||||
|
||||
.domainSetDirLabel = virSecurityDACDomainSetDirLabel,
|
||||
.domainSetPathLabel = virSecurityDACDomainSetPathLabel,
|
||||
};
|
||||
|
@ -118,7 +118,7 @@ typedef int (*virSecurityDomainSetImageLabel) (virSecurityManagerPtr mgr,
|
||||
typedef int (*virSecurityDomainRestoreImageLabel) (virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
virStorageSourcePtr src);
|
||||
typedef int (*virSecurityDomainSetDirLabel) (virSecurityManagerPtr mgr,
|
||||
typedef int (*virSecurityDomainSetPathLabel) (virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
const char *path);
|
||||
|
||||
@ -172,7 +172,7 @@ struct _virSecurityDriver {
|
||||
|
||||
virSecurityDriverGetBaseLabel getBaseLabel;
|
||||
|
||||
virSecurityDomainSetDirLabel domainSetDirLabel;
|
||||
virSecurityDomainSetPathLabel domainSetPathLabel;
|
||||
};
|
||||
|
||||
virSecurityDriverPtr virSecurityDriverLookup(const char *name,
|
||||
|
@ -987,14 +987,14 @@ virSecurityManagerSetHugepages(virSecurityManagerPtr mgr,
|
||||
|
||||
|
||||
int
|
||||
virSecurityManagerDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
virSecurityManagerDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
const char *path)
|
||||
{
|
||||
if (mgr->drv->domainSetDirLabel) {
|
||||
if (mgr->drv->domainSetPathLabel) {
|
||||
int ret;
|
||||
virObjectLock(mgr);
|
||||
ret = mgr->drv->domainSetDirLabel(mgr, vm, path);
|
||||
ret = mgr->drv->domainSetPathLabel(mgr, vm, path);
|
||||
virObjectUnlock(mgr);
|
||||
return ret;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ int virSecurityManagerRestoreImageLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
virStorageSourcePtr src);
|
||||
|
||||
int virSecurityManagerDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
int virSecurityManagerDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
const char *path);
|
||||
|
||||
|
@ -2594,7 +2594,7 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
|
||||
}
|
||||
|
||||
static int
|
||||
virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
virSecuritySELinuxDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
const char *path)
|
||||
{
|
||||
@ -2652,5 +2652,5 @@ virSecurityDriver virSecurityDriverSELinux = {
|
||||
.domainGetSecurityMountOptions = virSecuritySELinuxGetSecurityMountOptions,
|
||||
.getBaseLabel = virSecuritySELinuxGetBaseLabel,
|
||||
|
||||
.domainSetDirLabel = virSecuritySELinuxDomainSetDirLabel,
|
||||
.domainSetPathLabel = virSecuritySELinuxDomainSetPathLabel,
|
||||
};
|
||||
|
@ -600,7 +600,7 @@ virSecurityStackRestoreImageLabel(virSecurityManagerPtr mgr,
|
||||
}
|
||||
|
||||
static int
|
||||
virSecurityStackDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
virSecurityStackDomainSetPathLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr vm,
|
||||
const char *path)
|
||||
{
|
||||
@ -609,7 +609,7 @@ virSecurityStackDomainSetDirLabel(virSecurityManagerPtr mgr,
|
||||
int rc = 0;
|
||||
|
||||
for (; item; item = item->next) {
|
||||
if (virSecurityManagerDomainSetDirLabel(item->securityManager,
|
||||
if (virSecurityManagerDomainSetPathLabel(item->securityManager,
|
||||
vm, path) < 0)
|
||||
rc = -1;
|
||||
}
|
||||
@ -667,5 +667,5 @@ virSecurityDriver virSecurityDriverStack = {
|
||||
|
||||
.getBaseLabel = virSecurityStackGetBaseLabel,
|
||||
|
||||
.domainSetDirLabel = virSecurityStackDomainSetDirLabel,
|
||||
.domainSetPathLabel = virSecurityStackDomainSetPathLabel,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user