summaryrefslogtreecommitdiff
path: root/Python/random.c
AgeCommit message (Collapse)AuthorLines
2017-01-09Don't use getentropy() on LinuxVictor Stinner-2/+9
Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but read from /dev/urandom to get random bytes, for example in os.urandom(). On Linux, getentropy() is implemented which getrandom() is blocking mode, whereas os.urandom() should not block.
2017-01-01only include sys/random.h if it seems like it might have something useful ↵Benjamin Peterson-1/+1
(#29057)
2016-12-19add a specific configure check for sys/random.h (closes #28932)Benjamin Peterson-1/+1
2016-11-12Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.Ned Deily-0/+3
Initial patch by Gareth Rees.
2016-06-10Fix typo in commentMartin Panter-1/+1
2015-10-01Issue #25003: os.urandom() doesn't use getentropy() on Solaris becauseVictor Stinner-4/+8
getentropy() is blocking, whereas os.urandom() should not block. getentropy() is supported since Solaris 11.3.
2015-03-30Issue #23115: os.urandom() now releases the GIL when the getentropy() is usedVictor Stinner-6/+14
(OpenBSD 5.6+).
2015-02-24Issue #23458: On POSIX, the file descriptor kept open by os.urandom() is nowVictor Stinner-0/+9
set to non inheritable
2015-02-16Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7).Serhiy Storchaka-1/+1
2014-12-26use getentropy when available (backport of 75ede5bec8db) (closes #23115)Benjamin Peterson-6/+35
2014-12-01Removed duplicated words in in comments and docs.Serhiy Storchaka-1/+1
2014-08-28PEP 466: backport persistent urandom fd (closes #21305)Benjamin Peterson-16/+78
Patch from Alex Gaynor.
2013-10-06Closes #15213: update comment for _PyOS_URandomGeorg Brandl-2/+3
2013-08-16Issue #18756: Improve error reporting in os.urandom() when the failure is ↵Antoine Pitrou-2/+6
due to something else than /dev/urandom not existing.
2012-09-07Issue #15340: Fix importing the random module when /dev/urandom cannot be ↵Antoine Pitrou-1/+2
opened. This was a regression caused by the hash randomization patch.
2012-02-21ensure no one tries to hash things before the random seed is foundBenjamin Peterson-4/+8
2012-02-20- Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw-0/+302
environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.