- use /dev/arandom
This commit is contained in:
parent
d122bb23a3
commit
7def45f9a1
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.32 2008/11/24 15:37:00 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.33 2010/03/21 10:46:43 jasper Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -7,7 +7,7 @@ COMMENT-perl= UUID modules for Perl
|
||||
|
||||
VERSION= 1.6.0
|
||||
DISTNAME= uuid-${VERSION}
|
||||
FULLPKGNAME-main= uuid-${VERSION}
|
||||
FULLPKGNAME-main= uuid-${VERSION}p0
|
||||
FULLPKGNAME-perl= p5-UUID-${VERSION}p1
|
||||
CATEGORIES= devel
|
||||
SHARED_LIBS= uuid 13.22 \
|
||||
|
15
devel/uuid/patches/patch-uuid_prng_c
Normal file
15
devel/uuid/patches/patch-uuid_prng_c
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-uuid_prng_c,v 1.1 2010/03/21 10:46:43 jasper Exp $
|
||||
|
||||
/dev/arandom is prefered over /dev/urandom.
|
||||
|
||||
--- uuid_prng.c.orig Sun Feb 7 19:43:16 2010
|
||||
+++ uuid_prng.c Sun Feb 7 19:43:33 2010
|
||||
@@ -65,7 +65,7 @@ prng_rc_t prng_create(prng_t **prng)
|
||||
|
||||
/* try to open the system PRNG device */
|
||||
(*prng)->dev = -1;
|
||||
- if ((fd = open("/dev/urandom", O_RDONLY)) == -1)
|
||||
+ if ((fd = open("/dev/arandom", O_RDONLY)) == -1)
|
||||
fd = open("/dev/random", O_RDONLY|O_NONBLOCK);
|
||||
if (fd != -1) {
|
||||
(void)fcntl(fd, F_SETFD, FD_CLOEXEC);
|
Loading…
x
Reference in New Issue
Block a user