[libvirt] [PATCH] Remove single quotes from audit records

Osier Yang jyang at redhat.com
Fri Feb 10 04:15:38 UTC 2012


On 2012年02月10日 03:06, Marcelo Cerri wrote:
> 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 |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
> index 7d766a2..934e546 100644
> --- a/src/conf/domain_audit.c
> +++ b/src/conf/domain_audit.c
> @@ -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:

ACK and pushed.




More information about the libvir-list mailing list