summaryrefslogtreecommitdiff
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 75b8318db..e5fdd6b0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
24 - Added BSD compatible install program and autoconf test, thanks to 24 - Added BSD compatible install program and autoconf test, thanks to
25 Niels Kristian Bech Jensen <nkbj@image.dk> 25 Niels Kristian Bech Jensen <nkbj@image.dk>
26 - Solaris fixing, thanks to Ben Taylor <bent@clark.net> 26 - Solaris fixing, thanks to Ben Taylor <bent@clark.net>
27 - Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
27 28
2819991124 2919991124
29 - Merged very large OpenBSD source code reformat 30 - 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)
56 register int fd; 56 register int fd;
57 int tty; 57 int tty;
58 58
59#ifndef UT_LINESIZE
60# define UT_LINESIZE (sizeof(old_ut.ut_line))
61# define UT_NAMESIZE (sizeof(old_ut.ut_name))
62# ifdef HAVE_HOST_IN_UTMP
63# define UT_HOSTSIZE (sizeof(old_ut.ut_host))
64# endif
65#endif
66
59 tty = ttyslot(); 67 tty = ttyslot();
60 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { 68 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
61#ifdef HAVE_HOST_IN_UTMP 69#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, , )
56AC_CHECK_LIB(pam, pam_authenticate, , ) 56AC_CHECK_LIB(pam, pam_authenticate, , )
57 57
58dnl Checks for header files. 58dnl Checks for header files.
59AC_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) 59AC_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)
60 60
61dnl Checks for library functions. 61dnl Checks for library functions.
62AC_CHECK_FUNCS(openpty strlcpy strlcat mkdtemp arc4random setproctitle setlogin setenv) 62AC_CHECK_FUNCS(arc4random mkdtemp openpty setenv setlogin setproctitle strlcat strlcpy)
63 63
64AC_CHECK_FUNC(login, 64AC_CHECK_FUNC(login,
65 [AC_DEFINE(HAVE_LOGIN)], 65 [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 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.4 1999/11/25 00:54:59 damien Exp $"); 21RCSID("$Id: login.c,v 1.5 1999/11/25 02:08:31 damien Exp $");
22 22
23#include <utmp.h> 23#include <utmp.h>
24#include "ssh.h" 24#include "ssh.h"
@@ -29,6 +29,9 @@ RCSID("$Id: login.c,v 1.4 1999/11/25 00:54:59 damien Exp $");
29#ifdef HAVE_LASTLOG_H 29#ifdef HAVE_LASTLOG_H
30# include <lastlog.h> 30# include <lastlog.h>
31#endif 31#endif
32#ifdef HAVE_LOGIN_H
33# include <login.h>
34#endif
32 35
33/* 36/*
34 * Returns the time when the user last logged in. Returns 0 if the 37 * Returns the time when the user last logged in. Returns 0 if the