- Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>

This commit is contained in:
Damien Miller 1999-11-25 13:08:31 +11:00
parent d8087f62d6
commit 063fdf8275
4 changed files with 15 additions and 3 deletions

View File

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

View File

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

View File

@ -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)],

View File

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