From ipfw@ya3.so-net.ne.jp  Sun Jun  3 12:35:08 2001
Return-Path: <ipfw@ya3.so-net.ne.jp>
Received: from mgate09.so-net.ne.jp (mgate09.so-net.ne.jp [210.139.254.156])
	by hub.freebsd.org (Postfix) with ESMTP id EB53D37B403
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  3 Jun 2001 12:35:07 -0700 (PDT)
	(envelope-from ipfw@ya3.so-net.ne.jp)
Received: from mail.ya3.so-net.ne.jp (mspool11.so-net.ne.jp [210.139.248.11])
	by mgate09.so-net.ne.jp (8.8.8+3.0Wbeta9/3.6W01050922) with ESMTP id EAA20686
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 4 Jun 2001 04:35:06 +0900 (JST)
Received: from localhost (pd5ce02.kngwnt01.ap.so-net.ne.jp [202.213.206.2])
	by mail.ya3.so-net.ne.jp  with ESMTP id f53JZ5106927
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 4 Jun 2001 04:35:05 +0900 (JST)
Message-Id: <20010604043455C.koya@pluto.math.yokohama-cu.ac.jp>
Date: Mon, 04 Jun 2001 04:34:55 +0900
From: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Sender: Yoshihiro Koya <koya@math.yokohama-cu.ac.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: There is no urandom(4) man page
X-Send-Pr-Version: 3.113

>Number:         27858
>Category:       bin
>Synopsis:       There is no urandom(4) man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 03 12:40:08 PDT 2001
>Closed-Date:    Wed Jun 6 19:32:25 PDT 2001
>Last-Modified:  Wed Jun 06 19:32:43 PDT 2001
>Originator:     Yoshihiro Koya
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Dept. of Math. Sci., Yokohama City Univ.
>Environment:
System: FreeBSD current.my.domain 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed May 30 00:38:02 JST 2001 root@current.my.domain:/usr/obj/usr/src/sys/current i386

>Description:
If you browse random(3) man page, you may find
	SEE ALSO
	     rand(3), srand(3), urandom(4)
But there is no urandom(4) man page
>How-To-Repeat:
Type "man 3 random", for example.
>Fix:
There are two ways of fix, maybe.

(1) add urandom(4) man page

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/share/man/man4/Makefile,v
retrieving revision 1.122
diff -u -r1.122 Makefile
--- Makefile	2001/05/26 09:27:08	1.122
+++ Makefile	2001/06/03 19:09:23
@@ -190,6 +190,7 @@
 MLINKS+=netintro.4 networking.4
 MLINKS+=pcm.4 snd.4
 MLINKS+=pcvt.4 vt.4
+MLINKS+=random.4 urandom.4
 MLINKS+=scsi.4 CAM.4
 MLINKS+=scsi.4 SCSI.4
 MLINKS+=scsi.4 cam.4
Index: random.4
===================================================================
RCS file: /home/ncvs/src/share/man/man4/random.4,v
retrieving revision 1.7
diff -u -r1.7 random.4
--- random.4	2001/03/12 09:33:07	1.7
+++ random.4	2001/06/03 19:14:46
@@ -27,7 +27,8 @@
 .Dt RANDOM 4
 .Os
 .Sh NAME
-.Nm random
+.Nm random ,
+.Nm urandom
 .Nd the entropy device
 .Sh DESCRIPTION
 The
@@ -157,8 +158,9 @@
 handlers force the above variables
 into the stated ranges.
 .Sh FILES
-.Bl -tag -width /dev/random
+.Bl -tag -width /dev/urandom -compact
 .It Pa /dev/random
+.It Pa /dev/urandom
 .El
 .Sh SEE ALSO
 .Xr sysctl 8

(2) unrandom(4) --> random(4)

Index: rand.3
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/rand.3,v
retrieving revision 1.8
diff -u -u -r1.8 rand.3
--- rand.3	2001/04/27 08:16:57	1.8
+++ rand.3	2001/06/03 19:00:03
@@ -89,7 +89,7 @@
 The
 .Fn sranddev
 function initializes a seed using the
-.Xr urandom 4
+.Xr random 4
 random number device which returns good random numbers,
 suitable for cryptographic use.
 .Pp
@@ -101,7 +101,7 @@
 must be supplied by the caller.
 .Sh SEE ALSO
 .Xr random 3 ,
-.Xr urandom 4
+.Xr random 4
 .Sh STANDARDS
 The
 .Fn rand
Index: rand.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/rand.c,v
retrieving revision 1.6
diff -u -u -r1.6 rand.c
--- rand.c	2001/04/23 10:38:26	1.6
+++ rand.c	2001/06/03 19:00:34
@@ -111,7 +111,7 @@
  *
  * Many programs choose the seed value in a totally predictable manner.
  * This often causes problems.  We seed the generator using the much more
- * secure urandom(4) interface.
+ * secure random(4) interface.
  */
 void
 sranddev()
Index: random.3
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/random.3,v
retrieving revision 1.12
diff -u -u -r1.12 random.3
--- random.3	2000/04/21 09:40:59	1.12
+++ random.3	2001/06/03 18:58:54
@@ -101,7 +101,7 @@
 The
 .Fn srandomdev
 routine initialize a state array using
-.Xr urandom 4
+.Xr random 4
 random number device which returns good random numbers,
 suitable for cryptographic use.
 Note that this particular seeding
@@ -176,7 +176,7 @@
 .Sh SEE ALSO
 .Xr rand 3 ,
 .Xr srand 3 ,
-.Xr urandom 4
+.Xr random 4
 .Sh HISTORY
 These
 functions appeared in 
Index: random.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/random.c,v
retrieving revision 1.15
diff -u -u -r1.15 random.c
--- random.c	2001/04/23 10:14:28	1.15
+++ random.c	2001/06/03 19:00:58
@@ -282,7 +282,7 @@
  *
  * Many programs choose the seed value in a totally predictable manner.
  * This often causes problems.  We seed the generator using the much more
- * secure urandom(4) interface.  Note that this particular seeding
+ * secure random(4) interface.  Note that this particular seeding
  * procedure can generate states which are impossible to reproduce by
  * calling srandom() with any value, since the succeeding terms in the
  * state buffer are no longer derived from the LC algorithm applied to
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dd 
Responsible-Changed-By: dd 
Responsible-Changed-When: Sun Jun 3 23:34:01 PDT 2001 
Responsible-Changed-Why:  
I'll commit the first patch tomorrow. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27858 
Responsible-Changed-From-To: dd->markm 
Responsible-Changed-By: dd 
Responsible-Changed-When: Mon Jun 4 16:41:30 PDT 2001 
Responsible-Changed-Why:  
Over to markm, the author of the new /dev/random device.  Mark, I'm not quite 
sure which fix is more appropriate here.  It seems that /dev/urandom is 
being phased out.  So is it more appropriate to make urandom.4 a link to 
random.4 or change all occurances of urandom(4) to random(4)?  If you don't 
have time to do this, tell me which fix is appropriate and I'll do it. 

Thanks. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27858 
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Wed Jun 6 19:32:25 PDT 2001 
State-Changed-Why:  
Second patch committed, thanks! 


Responsible-Changed-From-To: markm->dd 
Responsible-Changed-By: dd 
Responsible-Changed-When: Wed Jun 6 19:32:25 PDT 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27858 
>Unformatted:
