Subject: misc/4349: MAKEDEV doesn't make /dev/{u,}random
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rkboni@concentric.net>
List: netbsd-bugs
Date: 10/25/1997 18:36:21
>Number:         4349
>Category:       misc
>Synopsis:       MAKEDEV doesn't make /dev/random, /dev/urandom
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 25 15:35:01 1997
>Last-Modified:
>Originator:     Rafal Boni
>Organization:
Procrastinators International, Inc.
>Release:        -current as of today (10/25)
>Environment:
System: NetBSD doppelganger 1.2G NetBSD 1.2G (DOPPELGANGER) #0: Sun Oct 19 22:20:50 EDT 1997 rafal@doppelganger:/home/doppelganger/src/current/src/sys/arch/i386/compile/DOPPELGANGER i386

	Seen on x86, but probably present on all others.

>Description:
	MAKEDEV doesn't make /dev/random, /dev/urandom

>How-To-Repeat:
	Notice you have no /dev/random, check to see if MAKEDEV makes
	the device, notice it doesn't.

>Fix:
	(for the x86... does /dev/random have major 46 on all archs??)


--- MAKEDEV.orig	Sat Oct 25 18:25:28 1997
+++ MAKEDEV	Sat Oct 25 18:34:18 1997
@@ -74,6 +74,7 @@
 #	lkm	loadable kernel modules interface
 #	audio	audio device
 #	apm	power management device
+#	random	random noise source
 #	tun*	network tunnel driver
 #	joy*	joystick device
 #	satlink* PlanetConnect satellite receiver driver
@@ -92,7 +93,7 @@
 	sh $0 std fd wt0 fd0 fd1 wd0 wd1 sd0 sd1 sd2 tty0 tty1 pty0 pty1
 	sh $0 st0 st1 ch0 cd0 cd1 mcd0 vnd0 vnd1 lpa0 lpa1 lpa2
 	sh $0 lpt0 lpt1 lpt2 ttyv0 bpf0 bpf1 bpf2 bpf3 tun0 tun1 ipl
-	sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1
+	sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1 random 
 	sh $0 speaker lkm mms0 lms0 pms0 audio joy0 joy1 apm local satlink0
 	sh $0 ttyv0 ttyv1 ttyv2 ttyv3 ttyv4 ttyv5 ttyv6 ttyv7 ttyv8
 	;;
@@ -354,6 +355,14 @@
 	rm -f speaker
 	mknod speaker c 27 0
 	chown root.wheel speaker
+	;;
+
+random)
+	rm -f random urandom
+	mknod random c 46 0
+	mknod urandom c 46 1
+	chown root.wheel random urandom
+	chmod 444 random urandom
 	;;
 
 lkm)
>Audit-Trail:
>Unformatted: