From: Paul Mackerras Date: Wed, 25 Mar 1998 02:19:31 +0000 (+0000) Subject: added get_host_seed X-Git-Tag: RELEASE_2_3_6~103 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=b03e0f44811d84b0be229b0f8498b275d0b2e386 added get_host_seed --- diff --git a/pppd/sys-aix4.c b/pppd/sys-aix4.c index d620b2f..fe38972 100644 --- a/pppd/sys-aix4.c +++ b/pppd/sys-aix4.c @@ -21,7 +21,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-aix4.c,v 1.12 1997/04/30 05:57:19 paulus Exp $"; +static char rcsid[] = "$Id: sys-aix4.c,v 1.13 1998/03/25 02:19:23 paulus Exp $"; #endif /* @@ -49,7 +49,6 @@ static char rcsid[] = "$Id: sys-aix4.c,v 1.12 1997/04/30 05:57:19 paulus Exp $"; #include #include -#include #include #include #include @@ -1277,6 +1276,15 @@ logwtmp(line, name, host) close(fd); } +/* + * Use the hostid as part of the random number seed. + */ +int +get_host_seed() +{ + return gethostid(); +} + /* * Code for locking/unlocking the serial device. */ diff --git a/pppd/sys-bsd.c b/pppd/sys-bsd.c index 46962de..22ba04d 100644 --- a/pppd/sys-bsd.c +++ b/pppd/sys-bsd.c @@ -21,7 +21,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-bsd.c,v 1.29 1997/11/27 06:10:04 paulus Exp $"; +static char rcsid[] = "$Id: sys-bsd.c,v 1.30 1998/03/25 02:19:26 paulus Exp $"; /* $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */ /* @@ -1389,6 +1389,15 @@ GetMask(addr) return mask; } +/* + * Use the hostid as part of the random number seed. + */ +int +get_host_seed() +{ + return gethostid(); +} + /* * lock - create a lock file for the named lock device */ diff --git a/pppd/sys-osf.c b/pppd/sys-osf.c index 42acdd8..d1b8220 100644 --- a/pppd/sys-osf.c +++ b/pppd/sys-osf.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-osf.c,v 1.12 1997/04/30 05:58:44 paulus Exp $"; +static char rcsid[] = "$Id: sys-osf.c,v 1.13 1998/03/25 02:19:27 paulus Exp $"; #endif #include @@ -1517,6 +1517,15 @@ strioctl(fd, cmd, ptr, ilen, olen) return 0; } +/* + * Use the hostid as part of the random number seed. + */ +int +get_host_seed() +{ + return gethostid(); +} + /* * Code for locking/unlocking the serial device. * This code is derived from chat.c. diff --git a/pppd/sys-sunos4.c b/pppd/sys-sunos4.c index 74c0217..a9d970e 100644 --- a/pppd/sys-sunos4.c +++ b/pppd/sys-sunos4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-sunos4.c,v 1.8 1997/04/30 05:58:52 paulus Exp $"; +static char rcsid[] = "$Id: sys-sunos4.c,v 1.9 1998/03/25 02:19:29 paulus Exp $"; #endif #include @@ -1326,6 +1326,15 @@ strioctl(fd, cmd, ptr, ilen, olen) return 0; } +/* + * Use the hostid as part of the random number seed. + */ +int +get_host_seed() +{ + return gethostid(); +} + /* * Code for locking/unlocking the serial device. * This code is derived from chat.c. diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index db70a15..01a3777 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.16 1997/04/30 05:59:25 paulus Exp $"; +static char rcsid[] = "$Id: sys-svr4.c,v 1.17 1998/03/25 02:19:31 paulus Exp $"; #endif #include @@ -1553,10 +1553,10 @@ logwtmp(line, name, host) } /* - * gethostid - return the serial number of this machine. + * get_host_seed - return the serial number of this machine. */ int -gethostid() +get_host_seed() { char buf[32];