On 07/04/14 11:11, Ján Tomko wrote: > On 07/04/2014 11:08 AM, Peter Krempa wrote: >> On 07/03/14 15:29, Ján Tomko wrote: >>> On 07/03/2014 12:04 PM, Peter Krempa wrote: >>>> Extract common operations done when creating an audit message to a >>>> separate generic function that can be reused and convert RNG, disk, FS >>>> and net audit to use it. >>>> --- >>>> src/conf/domain_audit.c | 175 ++++++++++++++++-------------------------------- >>>> 1 file changed, 57 insertions(+), 118 deletions(-) >>>> >>>> diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c >>>> index 91095b1..4c4290c 100644 >>>> --- a/src/conf/domain_audit.c >>>> +++ b/src/conf/domain_audit.c > >>> >>>> char *oldsrc = NULL; >>>> char *newsrc = NULL; >>>> const char *virt; >>>> >>>> - virUUIDFormat(vm->def->uuid, uuidstr); >>>> - if (!(vmname = virAuditEncode("vm", vm->def->name))) { >>>> - VIR_WARN("OOM while encoding audit message"); >>> >>>> + /* if both new and old source aren't provided don't log anything */ >>>> + if (!newsrcpath && !oldsrcpath) >>> >>> Please move this to the next commit and let this one be just code movement. >>> >> >> That condition is also necessary for this patch as auditing with both >> new and old definition missing doesn't make sense. Some of the other >> refactored functions rely on that. >> > > Right, I missed the condition in virDomainAuditRNG. > > Jan > I've fixed the uninitialized variable and the resource name for networks and I'm about to push this one in a minute. Thanks. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list