[Freeipa-devel] [PATCHES] 206-209 Add default CFLAGS & fix hardened build

Jan Cholasta jcholast at redhat.com
Fri Dec 6 10:52:43 UTC 2013


On 5.12.2013 13:31, Alexander Bokovoy wrote:
> On Thu, 05 Dec 2013, Petr Viktorin wrote:
>> On 12/05/2013 11:15 AM, Jan Cholasta wrote:
>>> Hi,
>>>
>>> the attached patches fix <https://fedorahosted.org/freeipa/ticket/3896>.
>>>
>>> Patch 207 should fix build failures some of you were having after
>>> hardenening was enabled in the spec file.
>>
>> Thanks!
>>
>> In 209, would (ret != 1) make more sense than (ret == -1)? AFAIU zero
>> would also indicate a problem, if it somehow ended up being returned.
> no, write() returns -1 if an error has happened and amount of the data
> written otherwise. We specifically need to check that there was an
> error, not that we wrote more or less than were supposed to write.
>
> We are looking for EPIPE and EINTR mostly, since other errors make little
> difference for our case. In case of EINTR we need to repeat or the
> worker thread didn't receive our shutdown request. In case of EPIPE we
> will also get SIGPIPE and in general this means the other thread died..
>
> However, even if writing to the pipe failed, we still need to wait until
> thread dies with pthread_join(). I think returning -1 here is premature.

Fixed, updated patches attached.

Also removed CFLAGS duplication, see patch 212.

-- 
Jan Cholasta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-206.1-Prefer-user-CFLAGS-CPPFLAGS-over-those-provided-by-r.patch
Type: text/x-patch
Size: 854 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131206/c1ac9c2a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-207.1-Include-LDFLAGS-provided-by-rpmbuild-in-global-LDFLA.patch
Type: text/x-patch
Size: 1367 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131206/c1ac9c2a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-208.1-Add-stricter-default-CFLAGS-to-Makefile.patch
Type: text/x-patch
Size: 781 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131206/c1ac9c2a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-209.1-Fix-compilation-error-in-ipa-cldap.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131206/c1ac9c2a/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-212.1-Remove-CFLAGS-duplication.patch
Type: text/x-patch
Size: 8924 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131206/c1ac9c2a/attachment-0004.bin>


More information about the Freeipa-devel mailing list