diff options
author | otto <> | 2005-11-30 07:51:02 +0000 |
---|---|---|
committer | otto <> | 2005-11-30 07:51:02 +0000 |
commit | f8452f05564b5820c3745b9348d85a2b3a745467 (patch) | |
tree | 803b53c012ae878cdf973f67d5346e2452f9e177 /src/lib/libc/stdlib/random.3 | |
parent | 75ccbec66ef4157baa8c840a64a98a73287280fb (diff) | |
download | openbsd-f8452f05564b5820c3745b9348d85a2b3a745467.tar.gz openbsd-f8452f05564b5820c3745b9348d85a2b3a745467.tar.bz2 openbsd-f8452f05564b5820c3745b9348d85a2b3a745467.zip |
Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a time
and remove fallback code. If somebody is dumb enough to make the
sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls
on process startup.
looks good miod@ ok deraadt@ tedu@
Diffstat (limited to 'src/lib/libc/stdlib/random.3')
-rw-r--r-- | src/lib/libc/stdlib/random.3 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3 index f43f06420d..626b040b50 100644 --- a/src/lib/libc/stdlib/random.3 +++ b/src/lib/libc/stdlib/random.3 | |||
@@ -25,7 +25,7 @@ | |||
25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | .\" SUCH DAMAGE. | 26 | .\" SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .\" $OpenBSD: random.3,v 1.17 2003/06/02 20:18:38 millert Exp $ | 28 | .\" $OpenBSD: random.3,v 1.18 2005/11/30 07:51:02 otto Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd April 19, 1991 | 30 | .Dd April 19, 1991 |
31 | .Dt RANDOM 3 | 31 | .Dt RANDOM 3 |
@@ -89,9 +89,8 @@ as the seed. | |||
89 | .Pp | 89 | .Pp |
90 | The | 90 | The |
91 | .Fn srandomdev | 91 | .Fn srandomdev |
92 | routine initializes a state array using the | 92 | routine initializes a state array using |
93 | .Xr arandom 4 | 93 | random numbers obtained from the kernel, |
94 | random number device which returns good random numbers, | ||
95 | suitable for cryptographic use. | 94 | suitable for cryptographic use. |
96 | Note that this particular seeding procedure can generate | 95 | Note that this particular seeding procedure can generate |
97 | states which are impossible to reproduce by calling | 96 | states which are impossible to reproduce by calling |