summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CREDITS1
-rw-r--r--ChangeLog2
-rw-r--r--configure.in5
-rw-r--r--defines.h33
-rw-r--r--loginrec.c4
5 files changed, 34 insertions, 11 deletions
diff --git a/CREDITS b/CREDITS
index 2c7dab97..59ffd553 100644
--- a/CREDITS
+++ b/CREDITS
@@ -12,6 +12,7 @@ Arkadiusz Miskiewicz <misiek@pld.org.pl> - IPv6 compat fixes
Ben Lindstrom <mouring@pconline.com> - NeXT support
Ben Taylor <bent@clark.net> - Solaris debugging and fixes
Bratislav ILICH <bilic@zepter.ru> - Configure fix
+Charles Levert <charles@comm.polymtl.ca> - SunOS 4 & bug fixes
Chip Salzenberg <chip@valinux.com> - Assorted patches
Chris Adams <cmadams@hiwaay.net> - OSF SIA support
Chris Saia <csaia@wtower.com> - SuSE packaging
diff --git a/ChangeLog b/ChangeLog
index 76de985e..d37de96f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
20000809
- (djm) Define AIX hard limits if headers don't. Report from
Bill Painter <william.t.painter@lmco.com>
+ - (djm) utmp direct write & SunOS 4 patch from Charles Levert
+ <charles@comm.polymtl.ca>
20000808
- (djm) Cleanup Redhat RPMs. Generate keys at runtime rather than install
diff --git a/configure.in b/configure.in
index 92659857..c74f65b9 100644
--- a/configure.in
+++ b/configure.in
@@ -137,6 +137,11 @@ case "$host" in
*-*-sunos4*)
CFLAGS="$CFLAGS -DSUNOS4"
AC_CHECK_FUNCS(getpwanam)
+ conf_utmp_location=/etc/utmp
+ conf_wtmp_location=/var/adm/wtmp
+ conf_lastlog_location=/var/adm/lastlog
+ MANTYPE='$(CATMAN)'
+ mansubdir=cat
;;
*-sni-sysv*)
CFLAGS="$CFLAGS -I/usr/local/include"
diff --git a/defines.h b/defines.h
index 23e00d1a..0480006d 100644
--- a/defines.h
+++ b/defines.h
@@ -329,18 +329,33 @@ typedef int mode_t;
#endif
/* FIXME: put default paths back in */
-#if !defined(UTMP_FILE) && defined(_PATH_UTMP)
-# define UTMP_FILE _PATH_UTMP
+#ifndef UTMP_FILE
+# ifdef _PATH_UTMP
+# define UTMP_FILE _PATH_UTMP
+# else
+# ifdef CONF_UTMP_FILE
+# define UTMP_FILE CONF_UTMP_FILE
+# endif
+# endif
#endif
-#if !defined(WTMP_FILE) && defined(_PATH_WTMP)
-# define WTMP_FILE _PATH_WTMP
+#ifndef WTMP_FILE
+# ifdef _PATH_WTMP
+# define WTMP_FILE _PATH_WTMP
+# else
+# ifdef CONF_WTMP_FILE
+# define WTMP_FILE CONF_WTMP_FILE
+# endif
+# endif
#endif
/* pick up the user's location for lastlog if given */
-#if !defined(LASTLOG_FILE) && defined(_PATH_LASTLOG)
-# define LASTLOG_FILE _PATH_LASTLOG
-#endif
-#if !defined(LASTLOG_FILE) && defined(CONF_LASTLOG_FILE)
-# define LASTLOG_FILE CONF_LASTLOG_FILE
+#ifndef LASTLOG_FILE
+# ifdef _PATH_LASTLOG
+# define LASTLOG_FILE _PATH_LASTLOG
+# else
+# ifdef CONF_LASTLOG_FILE
+# define LASTLOG_FILE CONF_LASTLOG_FILE
+# endif
+# endif
#endif
diff --git a/loginrec.c b/loginrec.c
index 8b82fa29..e7542c92 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -160,7 +160,7 @@
#include "xmalloc.h"
#include "loginrec.h"
-RCSID("$Id: loginrec.c,v 1.17 2000/07/11 02:15:54 djm Exp $");
+RCSID("$Id: loginrec.c,v 1.18 2000/08/09 06:34:28 djm Exp $");
/**
** prototypes for helper functions in this file
@@ -740,7 +740,7 @@ utmp_write_direct(struct logininfo *li, struct utmp *ut)
}
(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
- if (atomicio(write, fd, ut, sizeof(ut)) != sizeof(ut))
+ if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut))
log("utmp_write_direct: error writing %s: %s",
UTMP_FILE, strerror(errno));