]> xenbits.xensource.com Git - libvirt.git/commitdiff
audit: tweak audit messages to match conventions
authorEric Blake <eblake@redhat.com>
Sat, 26 Feb 2011 00:28:21 +0000 (17:28 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 9 Mar 2011 15:11:31 +0000 (08:11 -0700)
* src/qemu/qemu_audit.c (qemuDomainHostdevAudit): Avoid use of
"type", which has a pre-defined meaning.
(qemuDomainCgroupAudit): Likewise, as well as "item".

src/qemu/qemu_audit.c

index b1948c802875f183abb4be33fa6ff409a436379c..0f954c0c3fef464d144adb7914946bc99d7973a1 100644 (file)
@@ -159,7 +159,7 @@ qemuDomainHostdevAudit(virDomainObjPtr vm,
     }
 
     VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
-              "resrc=dev reason=%s %s uuid=%s type=%s %s",
+              "resrc=dev reason=%s %s uuid=%s bus=%s %s",
               reason, vmname, uuidstr,
               virDomainHostdevSubsysTypeToString(hostdev->source.subsys.type),
               device);
@@ -200,14 +200,14 @@ void qemuDomainCgroupAudit(virDomainObjPtr vm,
         return;
     }
     if (name &&
-        !(detail = virAuditEncode(STREQ(item, "path") ? "path" : "type",
+        !(detail = virAuditEncode(STREQ(item, "path") ? "path" : "category",
                                   name))) {
         VIR_WARN0("OOM while encoding audit message");
         goto cleanup;
     }
 
     VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
-              "resrc=cgroup reason=%s %s uuid=%s item=%s%s%s",
+              "resrc=cgroup reason=%s %s uuid=%s class=%s%s%s",
               reason, vmname, uuidstr,
               item, detail ? " " : "", detail ? detail : "");