diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-24 16:01:46 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-24 16:01:46 +0000 |
| commit | 6a95b13d8da9ce0218232f5fd7945fe452257059 (patch) | |
| tree | 54982adccbadb7e345dadc8290d452ad2cd13d9f | |
| parent | c59856210e18c75775f664effaa6d142035d4902 (diff) | |
Notes
| -rw-r--r-- | usr.sbin/ppp/chap.c | 5 | ||||
| -rw-r--r-- | usr.sbin/ppp/command.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index 63fe34c44aa6..f5bffb44d22c 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; diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index f78370bfd0ef..223cfa03fb40 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.34 1997/03/10 08:04:15 ache Exp $ + * $Id: command.c,v 1.35 1997/03/17 14:47:56 ache Exp $ * */ #include <sys/types.h> @@ -655,8 +655,9 @@ char **argv; VarRedialTimeout = -1; printf("Using random redial timeout.\n"); if (!randinit) { - srandom((unsigned long)(time(NULL) ^ getpid())); randinit = 1; + if (srandomdev() < 0) + srandom((unsigned long)(time(NULL) ^ getpid())); } } else { |
