summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-25 13:08:31 +1100
committerDamien Miller <djm@mindrot.org>1999-11-25 13:08:31 +1100
commit063fdf82755e53b5a2cf5265aaa654969b23b459 (patch)
tree03686b2d3c1be5990c412720de4ff889f734c702
parentd8087f62d6974c812fb956429ec0dba801ab66d3 (diff)
- Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
-rw-r--r--ChangeLog1
-rw-r--r--bsd-login.c8
-rw-r--r--configure.in4
-rw-r--r--login.c5
4 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 75b8318d..e5fdd6b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
- Added BSD compatible install program and autoconf test, thanks to
Niels Kristian Bech Jensen <nkbj@image.dk>
- Solaris fixing, thanks to Ben Taylor <bent@clark.net>
+ - Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
19991124
- Merged very large OpenBSD source code reformat
diff --git a/bsd-login.c b/bsd-login.c
index 93f23026..dcbabe0b 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 0de61631..b0dde23e 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 ddd58ff6..81bae820 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 <utmp.h>
#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 <lastlog.h>
#endif
+#ifdef HAVE_LOGIN_H
+# include <login.h>
+#endif
/*
* Returns the time when the user last logged in. Returns 0 if the