From 063fdf82755e53b5a2cf5265aaa654969b23b459 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 25 Nov 1999 13:08:31 +1100 Subject: - Merged beginnings of AIX support from Tor-Ake Fransson --- ChangeLog | 1 + bsd-login.c | 8 ++++++++ configure.in | 4 ++-- login.c | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75b8318db..e5fdd6b0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ - Added BSD compatible install program and autoconf test, thanks to Niels Kristian Bech Jensen - Solaris fixing, thanks to Ben Taylor + - Merged beginnings of AIX support from Tor-Ake Fransson 19991124 - Merged very large OpenBSD source code reformat diff --git a/bsd-login.c b/bsd-login.c index 93f230266..dcbabe0bf 100644 --- a/bsd-login.c +++ b/bsd-login.c @@ -56,6 +56,14 @@ login(utp) register int fd; int tty; +#ifndef UT_LINESIZE +# define UT_LINESIZE (sizeof(old_ut.ut_line)) +# define UT_NAMESIZE (sizeof(old_ut.ut_name)) +# ifdef HAVE_HOST_IN_UTMP +# define UT_HOSTSIZE (sizeof(old_ut.ut_host)) +# endif +#endif + tty = ttyslot(); if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { #ifdef HAVE_HOST_IN_UTMP diff --git a/configure.in b/configure.in index 0de61631d..b0dde23ee 100644 --- a/configure.in +++ b/configure.in @@ -56,10 +56,10 @@ AC_CHECK_LIB(dl, dlopen, , ) AC_CHECK_LIB(pam, pam_authenticate, , ) dnl Checks for header files. -AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h netgroup.h maillock.h utmp.h util.h sys/select.h sys/time.h) +AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h pty.h shadow.h util.h utmp.h sys/select.h sys/time.h) dnl Checks for library functions. -AC_CHECK_FUNCS(openpty strlcpy strlcat mkdtemp arc4random setproctitle setlogin setenv) +AC_CHECK_FUNCS(arc4random mkdtemp openpty setenv setlogin setproctitle strlcat strlcpy) AC_CHECK_FUNC(login, [AC_DEFINE(HAVE_LOGIN)], diff --git a/login.c b/login.c index ddd58ff67..81bae8205 100644 --- a/login.c +++ b/login.c @@ -18,7 +18,7 @@ */ #include "includes.h" -RCSID("$Id: login.c,v 1.4 1999/11/25 00:54:59 damien Exp $"); +RCSID("$Id: login.c,v 1.5 1999/11/25 02:08:31 damien Exp $"); #include #include "ssh.h" @@ -29,6 +29,9 @@ RCSID("$Id: login.c,v 1.4 1999/11/25 00:54:59 damien Exp $"); #ifdef HAVE_LASTLOG_H # include #endif +#ifdef HAVE_LOGIN_H +# include +#endif /* * Returns the time when the user last logged in. Returns 0 if the -- cgit v1.2.3