diff options
author | Paul Mackerras <paulus@samba.org> | 1995-04-24 05:59:12 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 1995-04-24 05:59:12 +0000 |
commit | 9abf2cd6f7a0cc812f5a20c088999a7058607b24 (patch) | |
tree | 6aa99dc6f90dbc3ec85233337d5bd15ba0811f41 /pppd/chap.c | |
parent | 08b5e975f6d15eae1998b76d2aea04186e039cc9 (diff) | |
download | ppp-9abf2cd6f7a0cc812f5a20c088999a7058607b24.tar.gz |
use random number gen from magic.c, memcmp instead of bcmp
Diffstat (limited to 'pppd/chap.c')
-rw-r--r-- | pppd/chap.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/pppd/chap.c b/pppd/chap.c index a0400b9..72870c5 100644 --- a/pppd/chap.c +++ b/pppd/chap.c @@ -19,7 +19,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: chap.c,v 1.6 1994/10/24 04:31:11 paulus Exp $"; +static char rcsid[] = "$Id: chap.c,v 1.7 1995/04/24 05:59:12 paulus Exp $"; #endif /* @@ -67,7 +67,7 @@ ChapInit(unit) cstate->serverstate = CHAPSS_INITIAL; cstate->timeouttime = CHAP_DEFTIMEOUT; cstate->max_transmits = CHAP_DEFTRANSMITS; - srand48((long) time(NULL)); /* joggle random number generator */ + /* random number generator is initialized in magic_init */ } @@ -506,7 +506,7 @@ ChapReceiveResponse(cstate, inp, id, len) MD5Final(&mdContext); /* compare local and remote MDs and send the appropriate status */ - if (bcmp (mdContext.digest, remmd, MD5_SIGNATURE_SIZE) == 0) + if (memcmp (mdContext.digest, remmd, MD5_SIGNATURE_SIZE) == 0) code = CHAP_SUCCESS; /* they are the same! */ break; @@ -806,18 +806,3 @@ ChapPrintPkt(p, plen, printer, arg) return len + CHAP_HEADERLEN; } - -#ifdef NO_DRAND48 - -double drand48() -{ - return (double)random() / (double)0x7fffffffL; /* 2**31-1 */ -} - -void srand48(seedval) -long seedval; -{ - srand((int)seedval); -} - -#endif |