- (djm) utmp direct write & SunOS 4 patch from Charles Levert

<charles@comm.polymtl.ca>
This commit is contained in:
Damien Miller 2000-08-09 16:34:27 +10:00
parent d17b8d5aee
commit 36ccb5c4f3
5 changed files with 34 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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));