[Patch] PR 31228, Fix close-on-exec race.
David Daney
ddaney@avtrex.com
Mon Mar 26 06:11:00 GMT 2007
Mark Mitchell wrote:
> David Daney wrote:
>
>
>> It is not a regression. The bug is a race condition for which there is
>> no evidence that it has ever actually caused undesirable behavior or
>> even occurred. It is however a potential security hole in libgcj.
>>
>
> Security issues are a big deal; go ahead and apply the patch.
>
Thanks Mark.
Committed as revision 123208 to the gcc-4_2-branch.
2007-03-25 David Daney <ddaney@avtrex.com>
PR libgcj/31228
* configure.ac: Add checks for getrlimit and sys/resource.h.
* include/posix.h (_Jv_platform_close_on_exec): Remove.
* include/config.h.in: Regenerate.
* configure: Regenerate.
* gnu/java/nio/channels/natFileChannelPosix.cc (open): Remove call to
_Jv_platform_close_on_exec;
* gnu/java/net/natPlainSocketImplPosix.cc (create): Likewise.
(accept): Likewise.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (create):Likewise.
* java/lang/natPosixProcess.cc: Include sys/resource.h.
(nativeSpawn): Close all file descriptors. Don't set FD_CLOEXEC on
pipes.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: closeall.4_2.diff.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070326/b68bdd97/attachment.txt>
More information about the Java-patches
mailing list