if ksh invoked as sh, don't seed with /dev/urandom
(because even a 4-byte read slows configure/make down a lot)
This commit is contained in:
parent
5860828e51
commit
b77a4be013
4
main.c
4
main.c
@ -1,4 +1,4 @@
|
|||||||
/* $MirBSD: main.c,v 1.3 2004/04/26 18:24:39 tg Exp $ */
|
/* $MirBSD: main.c,v 1.4 2004/04/26 18:28:07 tg Exp $ */
|
||||||
/* $OpenBSD: main.c,v 1.26 2004/01/08 05:43:14 jmc Exp $ */
|
/* $OpenBSD: main.c,v 1.26 2004/01/08 05:43:14 jmc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -259,7 +259,7 @@ main(int argc, char *argv[])
|
|||||||
setint(global("PPID"), (long) ppid);
|
setint(global("PPID"), (long) ppid);
|
||||||
#ifdef KSH
|
#ifdef KSH
|
||||||
trnd = *((long *)kshname);
|
trnd = *((long *)kshname);
|
||||||
if ((tfil = fopen("/dev/urandom", "rb")) != NULL) {
|
if (Flag(FSH) != 1) if ((tfil = fopen("/dev/urandom", "rb")) != NULL) {
|
||||||
fread(&trnd, 4, 1, tfil);
|
fread(&trnd, 4, 1, tfil);
|
||||||
fclose(tfil);
|
fclose(tfil);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user