diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f046fbff9715595ef019cdfa426d71dd7a0b37cb..2b553699af6994463e37d66adae6b015bf782972 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 ed1e0e5029255ce4e1e9b663be6fdfd6d187b5d9..e031e0fc42c8690a17768b2bf95a70d607744c4e 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 81d86c2d1aa27bdf62e771233733ad5d1b234707..c0873007d397133cb05c6b0edcfd8af2cf2e80ba 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 a09aba5f62c66a37079d5226c44ebb5f00dd7322..df3ed4793be8c30e7610733bc37e5a228d5b3ec4 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 784b0dee65eaa38db5b933ca5ce82f569c450e25..7cb62f0293432620580f3f531aa91d15151c6801 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 07a05224e0be10bcb935411514bbaa22f6f8de8f..ecb4a40f05c80a49b1d4d7fabe51335535082d9b 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 e534e31d4a55b675a8c5886d8b857e53f7094b24..4cbc2d85d0f122c06f0219d2777e022da6cf02e0 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 04760a1f41d100d451e8743066e7f173be19234c..b33d54a81d58c7b1f9c74d0a66c6b0025f8633a2 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 00d1fa7012bbd90e5e5db4396952ea086f2ee9aa..3ea27518fcc10acce46b14c7da6e4230c971ebee 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, };