diff --git a/ChangeLog b/ChangeLog index 9264597acf..8f6777d1df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Feb 6 00:02:31 2010 Tanaka Akira + + * 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 16:38:08 2010 Nobuyoshi Nakada * lib/delegate.rb (Delegator): include copy of Kernel. diff --git a/lib/securerandom.rb b/lib/securerandom.rb index fe0e005554..1c88a61fd7 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -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? diff --git a/random.c b/random.c index 8d170a42ea..b9b5ad4e76 100644 --- a/random.c +++ b/random.c @@ -471,9 +471,6 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) #endif #ifdef O_NOCTTY |O_NOCTTY -#endif -#ifdef O_NOFOLLOW - |O_NOFOLLOW #endif )) >= 0) { if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {