- (dtucker) [configure.ac loginrec.c] Bug #464: Use updwtmpx on platforms

that support it.  from & ok mouring@
This commit is contained in:
Darren Tucker 2004-02-10 16:49:35 +11:00
parent cfea2063e5
commit c28b88a314
3 changed files with 11 additions and 4 deletions

View File

@ -13,6 +13,8 @@
- (dtucker) [openbsd-compat/port-aix.c openbsd-compat/port-aix.h] Move
include from port-aix.h to port-aix.c and remove unnecessary function
definition. Fixes build errors on AIX.
- (dtucker) [configure.ac loginrec.c] Bug #464: Use updwtmpx on platforms
that support it. from & ok mouring@
20040207
- (dtucker) OpenBSD CVS Sync
@ -1836,4 +1838,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.3222 2004/02/10 04:27:34 dtucker Exp $
$Id: ChangeLog,v 1.3223 2004/02/10 05:49:35 dtucker Exp $

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.194 2004/02/06 10:29:42 dtucker Exp $
# $Id: configure.ac,v 1.195 2004/02/10 05:49:35 dtucker Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@ -801,7 +801,7 @@ AC_CHECK_FUNCS(\
setproctitle setregid setreuid setrlimit \
setsid setvbuf sigaction sigvec snprintf socketpair strerror \
strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \
truncate utimes vhangup vsnprintf waitpid \
truncate updwtmpx utimes vhangup vsnprintf waitpid \
)
# IRIX has a const char return value for gai_strerror()

View File

@ -158,7 +158,7 @@
#include "log.h"
#include "atomicio.h"
RCSID("$Id: loginrec.c,v 1.53 2003/11/21 12:48:55 djm Exp $");
RCSID("$Id: loginrec.c,v 1.54 2004/02/10 05:49:35 dtucker Exp $");
#ifdef HAVE_UTIL_H
# include <util.h>
@ -1183,6 +1183,7 @@ wtmp_get_entry(struct logininfo *li)
static int
wtmpx_write(struct logininfo *li, struct utmpx *utx)
{
#ifndef HAVE_UPDWTMPX
struct stat buf;
int fd, ret = 1;
@ -1202,6 +1203,10 @@ wtmpx_write(struct logininfo *li, struct utmpx *utx)
(void)close(fd);
return ret;
#else
updwtmpx(WTMPX_FILE, utx);
return 1;
#endif
}