diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-01-06 23:07:45 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-01-06 23:07:45 (GMT) |
commit | ff558f5aba40bd173f336503def886a12f8db016 (patch) | |
tree | e9b56854a7f08f4ab52757fab037cbe171e1d497 /Python/fileutils.c | |
parent | 84b6fb0eea29b3b28a1a11124526b01ec0c9d17a (diff) | |
download | cpython-ff558f5aba40bd173f336503def886a12f8db016.zip cpython-ff558f5aba40bd173f336503def886a12f8db016.tar.gz cpython-ff558f5aba40bd173f336503def886a12f8db016.tar.bz2 |
Issue #29157: Prefer getrandom() over getentropy()
* dev_urandom() now calls py_getentropy(). Prepare the fallback to support
getentropy() failure and falls back on reading from /dev/urandom.
* Simplify dev_urandom(). pyurandom() is now responsible to call getentropy()
or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
* getrandom() is now preferred over getentropy(). The glibc 2.24 now implements
getentropy() on Linux using the getrandom() syscall. But getentropy()
doesn't support non-blocking mode. Since getrandom() is tried first, it's not
more needed to explicitly exclude getentropy() on Solaris. Replace:
"if defined(HAVE_GETENTROPY) && !defined(sun)"
with "if defined(HAVE_GETENTROPY)"
* Enhance py_getrandom() documentation. py_getentropy() now supports ENOSYS,
EPERM & EINTR
Diffstat (limited to 'Python/fileutils.c')
0 files changed, 0 insertions, 0 deletions