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 253cbbf..ed9e6cf 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -1657,6 +1657,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 951125d..0a9b515 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 c7c4921..6e02a37 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -2694,6 +2694,9 @@ virSecurityDriver virSecurityDriverSELinux = {
.domainSetSecurityImageLabel = virSecuritySELinuxSetImageLabel,
.domainRestoreSecurityImageLabel = virSecuritySELinuxRestoreImageLabel,
+ .domainSetSecurityMemoryLabel = virSecuritySELinuxSetMemoryLabel,
+ .domainRestoreSecurityMemoryLabel = virSecuritySELinuxRestoreMemoryLabel,
+
.domainSetSecurityDaemonSocketLabel = virSecuritySELinuxSetDaemonSocketLabel,
.domainSetSecuritySocketLabel = virSecuritySELinuxSetSocketLabel,
.domainClearSecuritySocketLabel = virSecuritySELinuxClearSocketLabel,
--
2.8.4