It already labels abritrary paths, so it's just the naming that was
wrong.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
v3: The other patch from the series was pushed, so this is the only
one missing right now, so it needed rebasing.
src/libvirt_private.syms | 2 +-
src/qemu/qemu_domain.c | 4 ++--
src/qemu/qemu_process.c | 4 ++--
src/security/security_dac.c | 8 ++++----
src/security/security_driver.h | 8 ++++----
src/security/security_manager.c | 10 +++++-----
src/security/security_manager.h | 6 +++---
src/security/security_selinux.c | 8 ++++----
src/security/security_stack.c | 12 ++++++------
9 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 61fc5004bbb7..1118fdcfa3bc 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1055,7 +1055,7 @@ virSecurityDriverLookup;
# security/security_manager.h
virSecurityManagerCheckAllLabel;
virSecurityManagerClearSocketLabel;
-virSecurityManagerDomainSetDirLabel;
+virSecurityManagerDomainSetPathLabel;
virSecurityManagerGenLabel;
virSecurityManagerGetBaseLabel;
virSecurityManagerGetDOI;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ed1e0e502925..e031e0fc42c8 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -527,8 +527,8 @@ qemuDomainWriteMasterKeyFile(virQEMUDriverPtr driver,
goto cleanup;
}
- if (virSecurityManagerDomainSetDirLabel(driver->securityManager,
- vm->def, path) < 0)
+ if (virSecurityManagerDomainSetPathLabel(driver->securityManager,
+ vm->def, path) < 0)
goto cleanup;
ret = 0;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 81d86c2d1aa2..c0873007d397 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4486,8 +4486,8 @@ qemuProcessMakeDir(virQEMUDriverPtr driver,
goto cleanup;
}
- if (virSecurityManagerDomainSetDirLabel(driver->securityManager,
- vm->def, path) < 0)
+ if (virSecurityManagerDomainSetPathLabel(driver->securityManager,
+ vm->def, path) < 0)
goto cleanup;
ret = 0;
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index a09aba5f62c6..df3ed4793be8 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -1542,9 +1542,9 @@ virSecurityDACGetBaseLabel(virSecurityManagerPtr mgr,
}
static int
-virSecurityDACDomainSetDirLabel(virSecurityManagerPtr mgr,
- virDomainDefPtr def,
- const char *path)
+virSecurityDACDomainSetPathLabel(virSecurityManagerPtr mgr,
+ virDomainDefPtr def,
+ const char *path)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
virSecurityLabelDefPtr seclabel;
@@ -1607,5 +1607,5 @@ virSecurityDriver virSecurityDriverDAC = {
.getBaseLabel = virSecurityDACGetBaseLabel,
- .domainSetDirLabel = virSecurityDACDomainSetDirLabel,
+ .domainSetPathLabel = virSecurityDACDomainSetPathLabel,
};
diff --git a/src/security/security_driver.h b/src/security/security_driver.h
index 784b0dee65ea..7cb62f029343 100644
--- a/src/security/security_driver.h
+++ b/src/security/security_driver.h
@@ -118,9 +118,9 @@ typedef int (*virSecurityDomainSetImageLabel) (virSecurityManagerPtr
mgr,
typedef int (*virSecurityDomainRestoreImageLabel) (virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src);
-typedef int (*virSecurityDomainSetDirLabel) (virSecurityManagerPtr mgr,
- virDomainDefPtr def,
- const char *path);
+typedef int (*virSecurityDomainSetPathLabel) (virSecurityManagerPtr mgr,
+ virDomainDefPtr def,
+ const char *path);
struct _virSecurityDriver {
@@ -172,7 +172,7 @@ struct _virSecurityDriver {
virSecurityDriverGetBaseLabel getBaseLabel;
- virSecurityDomainSetDirLabel domainSetDirLabel;
+ virSecurityDomainSetPathLabel domainSetPathLabel;
};
virSecurityDriverPtr virSecurityDriverLookup(const char *name,
diff --git a/src/security/security_manager.c b/src/security/security_manager.c
index 07a05224e0be..ecb4a40f05c8 100644
--- a/src/security/security_manager.c
+++ b/src/security/security_manager.c
@@ -987,14 +987,14 @@ virSecurityManagerSetHugepages(virSecurityManagerPtr mgr,
int
-virSecurityManagerDomainSetDirLabel(virSecurityManagerPtr mgr,
- virDomainDefPtr vm,
- const char *path)
+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;
}
diff --git a/src/security/security_manager.h b/src/security/security_manager.h
index e534e31d4a55..4cbc2d85d0f1 100644
--- a/src/security/security_manager.h
+++ b/src/security/security_manager.h
@@ -160,8 +160,8 @@ int virSecurityManagerRestoreImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr vm,
virStorageSourcePtr src);
-int virSecurityManagerDomainSetDirLabel(virSecurityManagerPtr mgr,
- virDomainDefPtr vm,
- const char *path);
+int virSecurityManagerDomainSetPathLabel(virSecurityManagerPtr mgr,
+ virDomainDefPtr vm,
+ const char *path);
#endif /* VIR_SECURITY_MANAGER_H__ */
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 04760a1f41d1..b33d54a81d58 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -2594,9 +2594,9 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr
mgr,
}
static int
-virSecuritySELinuxDomainSetDirLabel(virSecurityManagerPtr mgr,
- virDomainDefPtr def,
- const char *path)
+virSecuritySELinuxDomainSetPathLabel(virSecurityManagerPtr mgr,
+ virDomainDefPtr def,
+ const char *path)
{
virSecurityLabelDefPtr seclabel;
@@ -2652,5 +2652,5 @@ virSecurityDriver virSecurityDriverSELinux = {
.domainGetSecurityMountOptions = virSecuritySELinuxGetSecurityMountOptions,
.getBaseLabel = virSecuritySELinuxGetBaseLabel,
- .domainSetDirLabel = virSecuritySELinuxDomainSetDirLabel,
+ .domainSetPathLabel = virSecuritySELinuxDomainSetPathLabel,
};
diff --git a/src/security/security_stack.c b/src/security/security_stack.c
index 00d1fa7012bb..3ea27518fcc1 100644
--- a/src/security/security_stack.c
+++ b/src/security/security_stack.c
@@ -600,17 +600,17 @@ virSecurityStackRestoreImageLabel(virSecurityManagerPtr mgr,
}
static int
-virSecurityStackDomainSetDirLabel(virSecurityManagerPtr mgr,
- virDomainDefPtr vm,
- const char *path)
+virSecurityStackDomainSetPathLabel(virSecurityManagerPtr mgr,
+ virDomainDefPtr vm,
+ const char *path)
{
virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
virSecurityStackItemPtr item = priv->itemsHead;
int rc = 0;
for (; item; item = item->next) {
- if (virSecurityManagerDomainSetDirLabel(item->securityManager,
- vm, path) < 0)
+ if (virSecurityManagerDomainSetPathLabel(item->securityManager,
+ vm, path) < 0)
rc = -1;
}
@@ -667,5 +667,5 @@ virSecurityDriver virSecurityDriverStack = {
.getBaseLabel = virSecurityStackGetBaseLabel,
- .domainSetDirLabel = virSecurityStackDomainSetDirLabel,
+ .domainSetPathLabel = virSecurityStackDomainSetPathLabel,
};
--
2.8.1