From owner-svn-src-all@FreeBSD.ORG Fri Mar 1 00:52:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 85251534; Fri, 1 Mar 2013 00:52:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5D72ECC4; Fri, 1 Mar 2013 00:52:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210qwM1019141; Fri, 1 Mar 2013 00:52:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210qwgh019138; Fri, 1 Mar 2013 00:52:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201303010052.r210qwgh019138@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 1 Mar 2013 00:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247512 - in stable/9/lib/libc: gen stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:52:58 -0000 Author: des Date: Fri Mar 1 00:52:57 2013 New Revision: 247512 URL: http://svnweb.freebsd.org/changeset/base/247512 Log: MFH (r240107,240111,240361): warn against using weak PRNGs Modified: stable/9/lib/libc/gen/rand48.3 stable/9/lib/libc/stdlib/random.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/rand48.3 ============================================================================== --- stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:46:41 2013 (r247511) +++ stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:52:57 2013 (r247512) @@ -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: stable/9/lib/libc/stdlib/random.3 ============================================================================== --- stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:46:41 2013 (r247511) +++ stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:52:57 2013 (r247512) @@ -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