Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/security/security_dac.c | 3 +++
src/security/security_nop.c | 19 +++++++++++++++++++
src/security/security_selinux.c | 3 +++
3 files changed, 25 insertions(+)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 27aa2bd6a..d6a2daf74 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -1975,6 +1975,9 @@ virSecurityDriver virSecurityDriverDAC = {
.domainSetSecurityImageLabel = virSecurityDACSetImageLabel,
.domainRestoreSecurityImageLabel = virSecurityDACRestoreImageLabel,
+ .domainSetSecurityMemoryLabel = virSecurityDACSetMemoryLabel,
+ .domainRestoreSecurityMemoryLabel = virSecurityDACRestoreMemoryLabel,
+
.domainSetSecurityDaemonSocketLabel = virSecurityDACSetDaemonSocketLabel,
.domainSetSecuritySocketLabel = virSecurityDACSetSocketLabel,
.domainClearSecuritySocketLabel = virSecurityDACClearSocketLabel,
diff --git a/src/security/security_nop.c b/src/security/security_nop.c
index 951125dce..0a9b51528 100644
--- a/src/security/security_nop.c
+++ b/src/security/security_nop.c
@@ -236,6 +236,22 @@ virSecurityDomainSetImageLabelNop(virSecurityManagerPtr mgr
ATTRIBUTE_UNUSED,
return 0;
}
+static int
+virSecurityDomainSetMemoryLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
+ virDomainDefPtr def ATTRIBUTE_UNUSED,
+ virDomainMemoryDefPtr mem ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static int
+virSecurityDomainRestoreMemoryLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
+ virDomainDefPtr def ATTRIBUTE_UNUSED,
+ virDomainMemoryDefPtr mem ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
virSecurityDriver virSecurityDriverNop = {
.privateDataLen = 0,
@@ -255,6 +271,9 @@ virSecurityDriver virSecurityDriverNop = {
.domainSetSecurityImageLabel = virSecurityDomainSetImageLabelNop,
.domainRestoreSecurityImageLabel = virSecurityDomainRestoreImageLabelNop,
+ .domainSetSecurityMemoryLabel = virSecurityDomainSetMemoryLabelNop,
+ .domainRestoreSecurityMemoryLabel = virSecurityDomainRestoreMemoryLabelNop,
+
.domainSetSecurityDaemonSocketLabel = virSecurityDomainSetDaemonSocketLabelNop,
.domainSetSecuritySocketLabel = virSecurityDomainSetSocketLabelNop,
.domainClearSecuritySocketLabel = virSecurityDomainClearSocketLabelNop,
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 1be2acd27..e20382a02 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -3007,6 +3007,9 @@ virSecurityDriver virSecurityDriverSELinux = {
.domainSetSecurityImageLabel = virSecuritySELinuxSetImageLabel,
.domainRestoreSecurityImageLabel = virSecuritySELinuxRestoreImageLabel,
+ .domainSetSecurityMemoryLabel = virSecuritySELinuxSetMemoryLabel,
+ .domainRestoreSecurityMemoryLabel = virSecuritySELinuxRestoreMemoryLabel,
+
.domainSetSecurityDaemonSocketLabel = virSecuritySELinuxSetDaemonSocketLabel,
.domainSetSecuritySocketLabel = virSecuritySELinuxSetSocketLabel,
.domainClearSecuritySocketLabel = virSecuritySELinuxClearSocketLabel,
--
2.11.0