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/branches/ruby_1_8@26583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fb8a3652d2
commit
07c670db6f
3 changed files with 7 additions and 4 deletions
|
|
@ -1,3 +1,10 @@
|
|||
Sat Feb 6 00:02:31 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* 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.
|
||||
|
||||
Fri Feb 5 23:09:01 2010 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/rational/rational.c: Added to provide a fast implementation
|
||||
|
|
|
|||
|
|
@ -57,7 +57,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?
|
||||
|
|
|
|||
3
random.c
3
random.c
|
|
@ -279,9 +279,6 @@ random_seed()
|
|||
#endif
|
||||
#ifdef O_NOCTTY
|
||||
|O_NOCTTY
|
||||
#endif
|
||||
#ifdef O_NOFOLLOW
|
||||
|O_NOFOLLOW
|
||||
#endif
|
||||
)) >= 0) {
|
||||
if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue