summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-10-06 09:05:47 +0000
committerkib <kib@FreeBSD.org>2010-10-06 09:05:47 +0000
commit7f328b518395680f97b3c939719ab6e6b96081c4 (patch)
tree16495a97a83866097c9c77a68928b7f1052f33ad
parent3eea740c21607b62e9eba7995b1d33a20c05a6d5 (diff)
downloadFreeBSD-src-7f328b518395680f97b3c939719ab6e6b96081c4.zip
FreeBSD-src-7f328b518395680f97b3c939719ab6e6b96081c4.tar.gz
Add cross-references to lrand48(3) and arc4random(3) from rand(3)
and random(3). Submitted by: Valentin Nechayev <netch netch kiev ua> MFC after: 1 week
-rw-r--r--lib/libc/stdlib/rand.311
-rw-r--r--lib/libc/stdlib/random.31
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/libc/stdlib/rand.3 b/lib/libc/stdlib/rand.3
index 9b24795..beb1443 100644
--- a/lib/libc/stdlib/rand.3
+++ b/lib/libc/stdlib/rand.3
@@ -32,7 +32,7 @@
.\" @(#)rand.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd May 25, 1999
+.Dd October 6, 2010
.Dt RAND 3
.Os
.Sh NAME
@@ -100,7 +100,16 @@ provides the same functionality as
A pointer to the context value
.Fa ctx
must be supplied by the caller.
+.Pp
+For better generator quality, use
+.Xr random 3
+or
+.Xr lrand48 3 .
+Applications requiring cryptographic quality randomness should use
+.Xr arc4random 3 .
.Sh SEE ALSO
+.Xr arc4random 3,
+.Xr lrand48 3 ,
.Xr random 3 ,
.Xr random 4
.Sh STANDARDS
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index aacf6e3..c6502bf 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -173,6 +173,7 @@ detects that the state information has been garbled, error
messages are printed on the standard error output.
.Sh SEE ALSO
.Xr arc4random 3 ,
+.Xr lrand48 3 ,
.Xr rand 3 ,
.Xr srand 3 ,
.Xr random 4
OpenPOWER on IntegriCloud