forked from nmathewson/libevent_obsolete
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seed the RNG using sysctl() as well as /dev/urandom
William Ahern points out that if the user has chrooted, they might not have a working /dev/urandom. Linux and many of the BSDs, however, define a sysctl interface to their kernel random number generators. This patch takes a belt-and-suspenders approach and tries to do use the sysctl _and_ the /dev/urandom approach if both are present. When using the sysctl approach, it tries to bulletproof itself by checking to make sure that the buffers are actually set by the sysctl calls.
- Loading branch information
1 parent
b1c7950
commit 71fc3eb
Showing
2 changed files
with
135 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters