summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2012-09-11 12:55:15 +0000
committerdes <des@FreeBSD.org>2012-09-11 12:55:15 +0000
commit33eb85902d21f1188eda1988e6b99dbec047f6db (patch)
treed23d8b9c85e17833cc26f2d09f2b6585f1ce5ad2 /lib/libc
parent60ab1436171fea4f1969b08ad29bff7736b5d36e (diff)
downloadFreeBSD-src-33eb85902d21f1188eda1988e6b99dbec047f6db.zip
FreeBSD-src-33eb85902d21f1188eda1988e6b99dbec047f6db.tar.gz
Add the same warning to rand48(3) as to rand(3) and random(3).
MFC after: 3 days
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/rand48.314
-rw-r--r--lib/libc/stdlib/random.31
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
index 8d325a1..c70a832 100644
--- a/lib/libc/gen/rand48.3
+++ b/lib/libc/gen/rand48.3
@@ -12,7 +12,7 @@
.\" @(#)rand48.3 V1.0 MB 8 Oct 1993
.\" $FreeBSD$
.\"
-.Dd February 2, 2010
+.Dd September 4, 2012
.Dt RAND48 3
.Os
.Sh NAME
@@ -49,6 +49,14 @@
.Ft void
.Fn lcong48 "unsigned short p[7]"
.Sh DESCRIPTION
+.Bf -symbolic
+The functions described in this manual page are not cryptographically
+secure.
+Cryptographic applications should use
+.Xr arc4random 3
+instead.
+.Ef
+.Pp
The
.Fn rand48
family of functions generates pseudo-random numbers using a linear
@@ -174,10 +182,8 @@ It is thus not possible to use values greater than 0xffff as the addend.
Note that all three methods of seeding the random number generator
always also set the multiplicand and addend for any of the six
generator calls.
-.Pp
-For a more powerful random number generator, see
-.Xr random 3 .
.Sh SEE ALSO
+.Xr arc4random 3 ,
.Xr rand 3 ,
.Xr random 3
.Sh AUTHORS
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index e0be8f1..4817440 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -181,7 +181,6 @@ messages are printed on the standard error output.
.Xr arc4random 3 ,
.Xr lrand48 3 ,
.Xr rand 3 ,
-.Xr srand 3 ,
.Xr random 4
.Sh HISTORY
These
OpenPOWER on IntegriCloud