diff options
author | ache <ache@FreeBSD.org> | 1997-03-24 16:01:46 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-03-24 16:01:46 +0000 |
commit | b2a735bded453a730bace8054ea4a72b95222b8e (patch) | |
tree | feb40f8487a41b2b105784ccca2d8da894de63bd /usr.sbin/ppp/chap.c | |
parent | cf3de83d9118c7a9c85d9153b1849bec9c1c7be3 (diff) | |
download | FreeBSD-src-b2a735bded453a730bace8054ea4a72b95222b8e.zip FreeBSD-src-b2a735bded453a730bace8054ea4a72b95222b8e.tar.gz |
Use srandomdev() to initialize RNG
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r-- | usr.sbin/ppp/chap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index 63fe34c..f5bffb4 100644 --- a/usr.sbin/ppp/chap.c +++ b/usr.sbin/ppp/chap.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: chap.c,v 1.11 1997/03/10 08:04:13 ache Exp $ + * $Id: chap.c,v 1.12 1997/03/17 14:47:55 ache Exp $ * * TODO: */ @@ -80,8 +80,9 @@ int chapid; char *cp; if (!randinit) { - srandom((unsigned long)(time(NULL) ^ getpid())); randinit = 1; + if (srandomdev() < 0) + srandom((unsigned long)(time(NULL) ^ getpid())); } cp = challenge_data; |