Re: [PATCH 01/13] Remove manual one-shot global initializers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/31/2012 01:17 PM, Daniel P. Berrange wrote:
> On Tue, Jul 31, 2012 at 01:06:59PM -0600, Eric Blake wrote:
>> On 07/31/2012 10:58 AM, Daniel P. Berrange wrote:
>>> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>>>

>>> -        virRandomInitialize(time(NULL) ^ getpid()) ||
>>> -        virNodeSuspendInit() < 0)
>>> +        virRandomInitialize(time(NULL) ^ getpid()))
>>
>> ...should we be getting rid of virRandomInitialize and doing that in a
>> one-shot initializer as well, since at least seclabeltest would have
>> benefitted from it?
> 
> I did wonder about that when I wrote this. I didn't do it because
> obviously virRandomInitialize has a parameter passed in. Now I see
> that every single caller just does the same 'time(NULL) ^ getpid()'
> we might as well just make virRandomInitialize be 'void' and used
> the fixed pattern for seed.
> 
> I'll do this as a followup patch though

Agreed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]