]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove single quotes from audit records
authorMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
Thu, 9 Feb 2012 19:06:00 +0000 (17:06 -0200)
committerOsier Yang <jyang@redhat.com>
Fri, 10 Feb 2012 04:14:20 +0000 (12:14 +0800)
Some audit records generated by libvirt contain fields enclosed by single
quotes. Since those fields are inside the msg field, which is enclosed by
single quotes, these records generated by libvirt are not correctly parsed by
libauparse.

src/conf/domain_audit.c

index 7d766a24ff19ba10fdc7c75905a77d69fc7ad229..934e5469b0396a922f1ae285ead88859e56960d6 100644 (file)
@@ -175,7 +175,7 @@ virDomainAuditNet(virDomainObjPtr vm,
     }
 
     VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
-              "virt=%s resrc=net reason=%s %s uuid=%s old-net='%s' new-net='%s'",
+              "virt=%s resrc=net reason=%s %s uuid=%s old-net=%s new-net=%s",
               virt, reason, vmname, uuidstr,
               oldDef ? oldMacstr : "?",
               newDef ? newMacstr : "?");
@@ -222,7 +222,7 @@ virDomainAuditNetDevice(virDomainDefPtr vmDef, virDomainNetDefPtr netDef,
     }
 
     VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
-              "virt=%s resrc=net reason=open %s uuid=%s net='%s' %s rdev=%s",
+              "virt=%s resrc=net reason=open %s uuid=%s net=%s %s rdev=%s",
               virt, vmname, uuidstr, macstr, dev_name, VIR_AUDIT_STR(rdev));
 
 cleanup: