RFR 8156709: Cannot call setSeed on NativePRNG on Mac if EGD is /dev/urandom
Wang Weijun
weijun.wang at oracle.com
Tue May 10 23:23:08 UTC 2016
Hi All
Please review the fix at
http://cr.openjdk.java.net/~weijun/8156709/webrev.00/
On *nix, we open EGD and write into it when setSeed() is called. We were aware of the device not openable and have been ignoring it (Note we still write to a mix random). Now it seems on a Mac is can be opened for write but not writable.
See this jshell output, the exception is thrown on write().
-> new FileOutputStream("/dev/urandom").write(12)
| java.io.IOException thrown: Operation not permitted
| at FileOutputStream.write (Native Method)
| at FileOutputStream.write (FileOutputStream.java:291)
| at (#17:1)
Thanks
Max
More information about the security-dev
mailing list