summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-09-29 16:24:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-09-29 16:24:23 +0000
commit305bca129e104c3e41213478dfd51baac10cf768 (patch)
treeaf776dd7c49b2dd596e09d84eb0cada1ae2990c3
parent83a5f0b158b6f9782f51e4060a7382c278c6cd1b (diff)
purge compat junk related to drand48; ok guenther
-rw-r--r--usr.sbin/pppd/chap.c5
-rw-r--r--usr.sbin/pppd/magic.c44
2 files changed, 2 insertions, 47 deletions
diff --git a/usr.sbin/pppd/chap.c b/usr.sbin/pppd/chap.c
index 830b849d2ae..3f37711fb44 100644
--- a/usr.sbin/pppd/chap.c
+++ b/usr.sbin/pppd/chap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chap.c,v 1.13 2009/10/27 23:59:53 deraadt Exp $ */
+/* $OpenBSD: chap.c,v 1.14 2013/09/29 16:24:21 deraadt Exp $ */
/*
* chap.c - Challenge Handshake Authentication Protocol.
@@ -111,9 +111,6 @@ static void ChapSendChallenge(chap_state *);
static void ChapSendResponse(chap_state *);
static void ChapGenChallenge(chap_state *);
-extern double drand48(void);
-extern void srand48(long);
-
/*
* ChapInit - Initialize a CHAP unit.
*/
diff --git a/usr.sbin/pppd/magic.c b/usr.sbin/pppd/magic.c
index 265e55d572a..fcc82215dd3 100644
--- a/usr.sbin/pppd/magic.c
+++ b/usr.sbin/pppd/magic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magic.c,v 1.9 2009/10/27 23:59:53 deraadt Exp $ */
+/* $OpenBSD: magic.c,v 1.10 2013/09/29 16:24:22 deraadt Exp $ */
/*
* magic.c - PPP Magic Number routines.
@@ -51,9 +51,6 @@
#include "pppd.h"
#include "magic.h"
-extern long mrand48(void);
-extern void srand48(long);
-
/*
* magic_init - Initialize the magic number generator.
*
@@ -64,14 +61,6 @@ extern void srand48(long);
void
magic_init()
{
-#if 0
- long seed;
- struct timeval t;
-
- gettimeofday(&t, NULL);
- seed = get_host_seed() ^ t.tv_sec ^ t.tv_usec ^ getpid();
- srand48(seed);
-#endif
}
/*
@@ -80,36 +69,5 @@ magic_init()
u_int32_t
magic()
{
-#if 0
- return (u_int32_t) mrand48();
-#else
return arc4random();
-#endif
-}
-
-#ifdef NO_DRAND48
-/*
- * Substitute procedures for those systems which don't have
- * drand48 et al.
- */
-
-double
-drand48()
-{
- return (double)random() / (double)0x7fffffffL; /* 2**31-1 */
}
-
-long
-mrand48()
-{
- return random();
-}
-
-void
-srand48(seedval)
-long seedval;
-{
- srandom((int)seedval);
-}
-
-#endif