From: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com, gcwilson@us.ibm.com, bryntcor@us.ibm.com
Subject: Re: [PATCH] auvirt: Remove workaround for VM name searching
Date: Mon, 13 Feb 2012 09:46:10 -0200 [thread overview]
Message-ID: <4F38F802.8010309@linux.vnet.ibm.com> (raw)
In-Reply-To: <201202110947.57134.sgrubb@redhat.com>
On 02/11/2012 12:47 PM, Steve Grubb wrote:
> On Thursday, February 09, 2012 02:18:40 PM Marcelo Cerri wrote:
>> With this patch, the workaround for creating the search criteria is removed
>> and escaped fields are properly retrieved.
>
> Applied, but one comment down below...
>
>> The unexpected single quote at the beginning of MAC addresses is fixed by a
>> patch in libvirt:
>>
>> https://www.redhat.com/archives/libvir-list/2012-February/msg00502.html
>> ---
>> tools/auvirt/auvirt.c | 39 +++++++++++++++------------------------
>> 1 files changed, 15 insertions(+), 24 deletions(-)
>>
>> diff --git a/tools/auvirt/auvirt.c b/tools/auvirt/auvirt.c
>> index c04780a..a89b097 100644
>> --- a/tools/auvirt/auvirt.c
>> +++ b/tools/auvirt/auvirt.c
>> @@ -781,7 +768,9 @@ int process_resource_event(auparse_state_t *au)
>> }
>> } else if (strcmp("cgroup", res_type) == 0) {
>> auparse_first_record(au);
>> - const char *cgroup = auparse_find_field(au, "cgroup");
>> + const char *cgroup = NULL;
>> + if (auparse_find_field(au, "cgroup"))
>> + cgroup = auparse_interpret_field(au);
>> rc += add_resource(au, uuid, uid, time, name, success, reason,
>> res_type, cgroup);
>
>
> So, if cgroup is NULL here, does anything go boom later?
No. It's safe because add_resource skips any invalid resource such as
NULL, "", "0" or "?".
>
> -Steve
>
prev parent reply other threads:[~2012-02-13 11:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 19:18 [PATCH] auvirt: Remove workaround for VM name searching Marcelo Cerri
2012-02-11 14:47 ` Steve Grubb
2012-02-13 11:46 ` Marcelo Cerri [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F38F802.8010309@linux.vnet.ibm.com \
--to=mhcerri@linux.vnet.ibm.com \
--cc=bryntcor@us.ibm.com \
--cc=gcwilson@us.ibm.com \
--cc=linux-audit@redhat.com \
--cc=sgrubb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox