summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-23 04:49:40 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-23 04:49:40 +0000
commit396a07307e4180f218958ffc4edf116b6bbc93e1 (patch)
tree09df0b87580b99d59c76a867125d37459d35b770 /io.c
parent176061e317b0285908fa360d8b28b6e0c6bb202a (diff)
merge revision(s) 31655:
* eval.c (rb_thread_atfork): When a ruby process forks, its random seed shall be reinitialized to prevent CVE-2003-0900 situation. This bug affects for 1.8 and earlier series, but not for 1.9. fixed [ruby-core:34944]. * io.c (pipe_open): ditto. * random.c (rb_reset_random_seed): ditto. * intern.h (rb_reset_random_seed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@31655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@31713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 6f420b16ac..00a1820d88 100644
--- a/io.c
+++ b/io.c
@@ -3254,6 +3254,7 @@ retry:
rb_thread_stop_timer();
switch ((pid = fork())) {
case 0: /* child */
+ rb_thread_atfork();
if (modef & FMODE_READABLE) {
close(pr[0]);
if (pr[1] != 1) {