|
|
127bba |
From 5005542c10ebdf6fcb4d76f31c522cc1c9136a67 Mon Sep 17 00:00:00 2001
|
|
|
127bba |
Message-Id: <5005542c10ebdf6fcb4d76f31c522cc1c9136a67@dist-git>
|
|
|
127bba |
From: John Ferlan <jferlan@redhat.com>
|
|
|
127bba |
Date: Fri, 4 Nov 2016 10:29:45 +0100
|
|
|
127bba |
Subject: [PATCH] conf: Remove incorrect check when encoding shmem audit
|
|
|
127bba |
message
|
|
|
127bba |
|
|
|
127bba |
Remove the !size check since size is initialized to NULL and thus
|
|
|
127bba |
causing the condition to always be true
|
|
|
127bba |
|
|
|
127bba |
(cherry picked from commit c951cdbff94ff577c5caa3dfff4153a161c073e6)
|
|
|
127bba |
|
|
|
127bba |
https://bugzilla.redhat.com/show_bug.cgi?id=1389013
|
|
|
127bba |
|
|
|
127bba |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
127bba |
---
|
|
|
127bba |
src/conf/domain_audit.c | 4 ++--
|
|
|
127bba |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
127bba |
|
|
|
127bba |
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
|
|
|
127bba |
index f0cc49c..be962d6 100644
|
|
|
127bba |
--- a/src/conf/domain_audit.c
|
|
|
127bba |
+++ b/src/conf/domain_audit.c
|
|
|
127bba |
@@ -982,7 +982,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
|
|
|
127bba |
|
|
|
127bba |
virUUIDFormat(vm->def->uuid, uuidstr);
|
|
|
127bba |
|
|
|
127bba |
- if (!vmname || !src || !size || !shmem ||
|
|
|
127bba |
+ if (!vmname || !src || !shmem ||
|
|
|
127bba |
virAsprintfQuiet(&size, "%llu", def->size) < 0) {
|
|
|
127bba |
VIR_WARN("OOM while encoding audit message");
|
|
|
127bba |
goto cleanup;
|
|
|
127bba |
@@ -996,7 +996,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
|
|
|
127bba |
|
|
|
127bba |
VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
|
|
|
127bba |
"virt=%s resrc=shmem reason=%s %s uuid=%s size=%s %s %s",
|
|
|
127bba |
- virt, reason, vmname, uuidstr, size ?: "?", shmem, src);
|
|
|
127bba |
+ virt, reason, vmname, uuidstr, size, shmem, src);
|
|
|
127bba |
|
|
|
127bba |
cleanup:
|
|
|
127bba |
VIR_FREE(vmname);
|
|
|
127bba |
--
|
|
|
127bba |
2.10.2
|
|
|
127bba |
|