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

Re: [libvirt] [PATCH] build: prefer mkostemp for multi-thread safety



On 11/01/2012 04:53 PM, Leonardo Arena wrote:
> On Thu, 2012-11-01 at 14:51 +0100, Martin Kletzander wrote:
>> On 11/01/2012 02:32 PM, Leonardo Arena wrote:
>>> On Wed, 2012-10-31 at 10:10 -0600, Eric Blake wrote:
>>>> On 10/31/2012 09:45 AM, Martin Kletzander wrote:
>>>>> On 10/31/2012 03:42 PM, Eric Blake wrote:
>>>>>> https://bugzilla.redhat.com/show_bug.cgi?id=871756
>>>>>>
>>>>>> Commit cd1e8d1 assumed that systems new enough to have journald
>>>>>> also have mkostemp; but this is not true for uclibc.
>>>>>>
>>>>>> For that matter, use of mkstemp[s] is unsafe in a multi-threaded
>>>>>> program.  We should prefer mkostemp[s] in the first place.
>>>>
>>>>>> -    fd = mkstemps(ret, 4);
>>>>>> +    fd = mkostemps(ret, 4, O_CLOEXEC);
>>>>>>      if (fd == -1) {
>>>>>>          vshError(ctl, _("mkstemps: failed to create temporary file: %s"),
>>>>>
>>>>> This message should be changed as well.
>>>>>
>>>>>>                   virStrerror(errno, ebuf, sizeof(ebuf)));
>>>>>>
>>>>>
>>>>> ACK with that changed.
>>>>
>>>> Fixed and pushed.  Hopefully Leonardo can give libvirt.git a test (since
>>>> we probably won't have any more rc builds between now and 1.0.0 on Friday).
>>>>
>>>
>>> Unfortunately I'm having some issues in making the distribution, due to automake affected by CVE-2012-3386, and bootstrapping in Alpine (with fixed automake) has some other issues. If there's anyone that can send me a tarball, I'll test it asap.
>>>
>>> Thank you
>>>
>>> -leonardo
>>>
>>
>> Feel free to grab this one:
>> http://people.redhat.com/mkletzan/libvirt-0.10.2.tar.gz
>>
>> I hope doing 'make dist' was enough =)
>>
>> Martin
> 
> It worked.
> I've closed BZ871756.
> 
> Thanks to all.
> 
> - leonardo
> 

And thanks to you as well.  Let us know how the 1.0.0 turns out as it is
already released.

Have a nice day,
Martin


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