From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 12:55:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8F08106566B; Tue, 11 Sep 2012 12:55:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A31058FC0A; Tue, 11 Sep 2012 12:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BCtFVj049620; Tue, 11 Sep 2012 12:55:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BCtFVG049617; Tue, 11 Sep 2012 12:55:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209111255.q8BCtFVG049617@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 11 Sep 2012 12:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240361 - in head/lib/libc: gen stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 12:55:15 -0000 Author: des Date: Tue Sep 11 12:55:15 2012 New Revision: 240361 URL: http://svn.freebsd.org/changeset/base/240361 Log: Add the same warning to rand48(3) as to rand(3) and random(3). MFC after: 3 days Modified: head/lib/libc/gen/rand48.3 head/lib/libc/stdlib/random.3 Modified: head/lib/libc/gen/rand48.3 ============================================================================== --- head/lib/libc/gen/rand48.3 Tue Sep 11 11:05:32 2012 (r240360) +++ head/lib/libc/gen/rand48.3 Tue Sep 11 12:55:15 2012 (r240361) @@ -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 gr 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 Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Sep 11 11:05:32 2012 (r240360) +++ head/lib/libc/stdlib/random.3 Tue Sep 11 12:55:15 2012 (r240361) @@ -181,7 +181,6 @@ messages are printed on the standard err .Xr arc4random 3 , .Xr lrand48 3 , .Xr rand 3 , -.Xr srand 3 , .Xr random 4 .Sh HISTORY These