summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2003-02-18 01:35:58 +0000
committerkris <kris@FreeBSD.org>2003-02-18 01:35:58 +0000
commitadf3acbf08eca304e79c77dc37dd58265125b51d (patch)
treed78b4c4879ad7b34b63c9aaf7453667d0df0c6d1 /usr.sbin
parent9b6dafeccc6c7234078d55ad288e8de67ab7c4dd (diff)
downloadFreeBSD-src-adf3acbf08eca304e79c77dc37dd58265125b51d.zip
FreeBSD-src-adf3acbf08eca304e79c77dc37dd58265125b51d.tar.gz
Use arc4random() instead of random() when generating the master key.
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/keyserv/keyserv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/keyserv/keyserv.c b/usr.sbin/keyserv/keyserv.c
index 0062e9b..9a907a7 100644
--- a/usr.sbin/keyserv/keyserv.c
+++ b/usr.sbin/keyserv/keyserv.c
@@ -239,12 +239,13 @@ randomize(master)
#endif
#ifdef KEYSERV_RANDOM
#ifdef __FreeBSD__
- srandomdev();
+ master->key.low = arc4random();
+ master->key.high = arc4random();
#else
srandom(seed);
-#endif
master->key.low = random();
master->key.high = random();
+#endif
#else
/* use stupid dangerous bad rand() */
#ifdef __FreeBSD__
OpenPOWER on IntegriCloud