From 81dbceea65d0798c93e33647e6d225d07230fe3e Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 11 Sep 2019 11:20:53 +0200 Subject: [PATCH] security: Rename virSecurityManagerGetDriver() to virSecurityManagerGetVirtDriver() This function is in fact returning the name of the virtualization driver that registered the security manager/driver. Signed-off-by: Michal Privoznik Reviewed-by: Cole Robinson --- src/security/security_manager.c | 4 ++-- src/security/security_manager.h | 2 +- src/security/security_selinux.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/security/security_manager.c b/src/security/security_manager.c index bb083ba9c8..c82ef1449f 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -114,7 +114,7 @@ virSecurityManagerNewStack(virSecurityManagerPtr primary) { virSecurityManagerPtr mgr = virSecurityManagerNewDriver(&virSecurityDriverStack, - virSecurityManagerGetDriver(primary), + virSecurityManagerGetVirtDriver(primary), primary->flags); if (!mgr) @@ -326,7 +326,7 @@ virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr) const char * -virSecurityManagerGetDriver(virSecurityManagerPtr mgr) +virSecurityManagerGetVirtDriver(virSecurityManagerPtr mgr) { return mgr->virtDriver; } diff --git a/src/security/security_manager.h b/src/security/security_manager.h index 1d4928fae3..306de92978 100644 --- a/src/security/security_manager.h +++ b/src/security/security_manager.h @@ -80,7 +80,7 @@ void virSecurityManagerTransactionAbort(virSecurityManagerPtr mgr); void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr); -const char *virSecurityManagerGetDriver(virSecurityManagerPtr mgr); +const char *virSecurityManagerGetVirtDriver(virSecurityManagerPtr mgr); const char *virSecurityManagerGetDOI(virSecurityManagerPtr mgr); const char *virSecurityManagerGetModel(virSecurityManagerPtr mgr); const char *virSecurityManagerGetBaseLabel(virSecurityManagerPtr mgr, int virtType); diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index ac8b7ae264..58ffdc6f9d 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -793,7 +793,7 @@ virSecuritySELinuxQEMUInitialize(virSecurityManagerPtr mgr) static int virSecuritySELinuxInitialize(virSecurityManagerPtr mgr) { - VIR_DEBUG("SELinuxInitialize %s", virSecurityManagerGetDriver(mgr)); + VIR_DEBUG("SELinuxInitialize %s", virSecurityManagerGetVirtDriver(mgr)); if (virThreadLocalInit(&contextList, virSecuritySELinuxContextListFree) < 0) { @@ -802,7 +802,7 @@ virSecuritySELinuxInitialize(virSecurityManagerPtr mgr) return -1; } - if (STREQ(virSecurityManagerGetDriver(mgr), "LXC")) { + if (STREQ(virSecurityManagerGetVirtDriver(mgr), "LXC")) { return virSecuritySELinuxLXCInitialize(mgr); } else { return virSecuritySELinuxQEMUInitialize(mgr); @@ -831,7 +831,7 @@ virSecuritySELinuxGenLabel(virSecurityManagerPtr mgr, data = virSecurityManagerGetPrivateData(mgr); - VIR_DEBUG("label=%s", virSecurityManagerGetDriver(mgr)); + VIR_DEBUG("label=%s", virSecurityManagerGetVirtDriver(mgr)); if (seclabel->type == VIR_DOMAIN_SECLABEL_DYNAMIC && seclabel->label) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -- GitLab