- Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
This commit is contained in:
parent
d8087f62d6
commit
063fdf8275
|
@ -24,6 +24,7 @@
|
||||||
- Added BSD compatible install program and autoconf test, thanks to
|
- Added BSD compatible install program and autoconf test, thanks to
|
||||||
Niels Kristian Bech Jensen <nkbj@image.dk>
|
Niels Kristian Bech Jensen <nkbj@image.dk>
|
||||||
- Solaris fixing, thanks to Ben Taylor <bent@clark.net>
|
- Solaris fixing, thanks to Ben Taylor <bent@clark.net>
|
||||||
|
- Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
|
||||||
|
|
||||||
19991124
|
19991124
|
||||||
- Merged very large OpenBSD source code reformat
|
- Merged very large OpenBSD source code reformat
|
||||||
|
|
|
@ -56,6 +56,14 @@ login(utp)
|
||||||
register int fd;
|
register int fd;
|
||||||
int tty;
|
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();
|
tty = ttyslot();
|
||||||
if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
|
if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
|
||||||
#ifdef HAVE_HOST_IN_UTMP
|
#ifdef HAVE_HOST_IN_UTMP
|
||||||
|
|
|
@ -56,10 +56,10 @@ AC_CHECK_LIB(dl, dlopen, , )
|
||||||
AC_CHECK_LIB(pam, pam_authenticate, , )
|
AC_CHECK_LIB(pam, pam_authenticate, , )
|
||||||
|
|
||||||
dnl Checks for header files.
|
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.
|
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_CHECK_FUNC(login,
|
||||||
[AC_DEFINE(HAVE_LOGIN)],
|
[AC_DEFINE(HAVE_LOGIN)],
|
||||||
|
|
5
login.c
5
login.c
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 <utmp.h>
|
||||||
#include "ssh.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
|
#ifdef HAVE_LASTLOG_H
|
||||||
# include <lastlog.h>
|
# include <lastlog.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_LOGIN_H
|
||||||
|
# include <login.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the time when the user last logged in. Returns 0 if the
|
* Returns the time when the user last logged in. Returns 0 if the
|
||||||
|
|
Loading…
Reference in New Issue