1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* random.c (fill_random_seed): don't use O_NOFOLLOW because

/dev/urandom is a symlink in OpenSolaris.

* lib/securerandom.rb (SecureRandom.random_bytes: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-02-05 15:04:38 +00:00
parent 7873c05684
commit 19b2909ee8
3 changed files with 7 additions and 4 deletions

View file

@ -64,7 +64,6 @@ module SecureRandom
flags = File::RDONLY
flags |= File::NONBLOCK if defined? File::NONBLOCK
flags |= File::NOCTTY if defined? File::NOCTTY
flags |= File::NOFOLLOW if defined? File::NOFOLLOW
begin
File.open("/dev/urandom", flags) {|f|
unless f.stat.chardev?