diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-20 21:21:39 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-20 21:21:39 +0000 |
commit | 793f30e38f990e4f947f72fb73a99ee445a26bab (patch) | |
tree | 7e0ac9b9a81490f369976a2a0450c820ace64bfb /io.c | |
parent | 408b181d2cec08ca3d492ecf2a10208aefd76c57 (diff) |
* 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
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3274,6 +3274,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) { |