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

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

 



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

--
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]