summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-02 00:03:55 +1000
committerDamien Miller <djm@mindrot.org>2000-05-02 00:03:55 +1000
commitfc0b11b5aa95f43109b384c6c752d2c20963c31a (patch)
treec9d85b50b10e2b561401a3f8f7d5576549f3dae1
parent7c0042629e1dfe12f42c3355cc843e269e50b914 (diff)
- Irix portability fixes - don't include netinet headers more than once
- Make sure we don't save PRNG seed more than once
-rw-r--r--ChangeLog2
-rw-r--r--configure.in3
-rw-r--r--defines.h5
-rw-r--r--entropy.c4
-rw-r--r--includes.h3
5 files changed, 7 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index de8490ae..6f54e449 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,8 @@
<gd@hilb1.medat.de>
- Add some missing ifdefs to auth2.c
- Deprecate perl-tk askpass.
+ - Irix portability fixes - don't include netinet headers more than once
+ - Make sure we don't save PRNG seed more than once
20000430
- Merge HP-UX fixes and TCB support from Ged Lodder <lodder@yacc.com.au>
diff --git a/configure.in b/configure.in
index 2e50df91..8046fa3e 100644
--- a/configure.in
+++ b/configure.in
@@ -43,7 +43,6 @@ case "$host" in
LDFLAGS="$LDFLAGS -L/usr/local/lib"
AC_DEFINE(IPADDR_IN_DISPLAY)
AC_DEFINE(USE_UTMPX)
- AC_DEFINE(NEED_IN_SYSTM_H)
AC_MSG_CHECKING(for HPUX trusted system password database)
if test -f /tcb/files/auth/system/default; then
AC_MSG_RESULT(yes)
@@ -130,7 +129,7 @@ if test -z "$no_libnsl" ; then
fi
# Checks for header files.
-AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
+AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
# Checks for library functions.
AC_CHECK_FUNCS(arc4random bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty)
diff --git a/defines.h b/defines.h
index b1e28ca0..9490e77e 100644
--- a/defines.h
+++ b/defines.h
@@ -7,11 +7,8 @@
#include <sys/socket.h> /* For SHUT_XXXX */
+# include <netinet/in_systm.h> /* For typedefs */
#include <netinet/in.h> /* For IPv6 macros */
-
-#ifdef NEED_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
#include <netinet/ip.h> /* For IPTOS macros */
#ifdef HAVE_SYS_BITYPES_H
diff --git a/entropy.c b/entropy.c
index edf14233..2766d90b 100644
--- a/entropy.c
+++ b/entropy.c
@@ -35,7 +35,7 @@
#include <openssl/rand.h>
#include <openssl/sha.h>
-RCSID("$Id: entropy.c,v 1.6 2000/04/29 23:30:46 damien Exp $");
+RCSID("$Id: entropy.c,v 1.7 2000/05/01 14:03:56 damien Exp $");
#ifdef EGD_SOCKET
#ifndef offsetof
@@ -520,6 +520,8 @@ prng_write_seedfile(void) {
if (prng_seed_saved)
return;
+ prng_seed_saved = 1;
+
pw = getpwuid(getuid());
if (pw == NULL)
fatal("Couldn't get password entry for current user (%i): %s",
diff --git a/includes.h b/includes.h
index 1a0e76f3..a83e0316 100644
--- a/includes.h
+++ b/includes.h
@@ -30,10 +30,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
#include <sys/un.h>
#include <sys/resource.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
#include <netinet/tcp.h>
-#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netdb.h>