- (dtucker) [acconfig.h configure.ac port-aix.c] Older AIXes don't declare

loginfailed at all, so assume 3-arg loginfailed if not declared.
This commit is contained in:
Darren Tucker 2003-07-14 16:21:44 +10:00
parent b9aa0a0baa
commit 5c6a91a39d
4 changed files with 27 additions and 22 deletions

View File

@ -1,7 +1,11 @@
20030714
- (dtucker) [acconfig.h configure.ac port-aix.c] Older AIXes don't declare
loginfailed at all, so assume 3-arg loginfailed if not declared.
20030708 20030708
- (dtucker) [acconfig.h auth-passwd.c configure.ac session.c port-aix.[ch]] - (dtucker) [acconfig.h auth-passwd.c configure.ac session.c port-aix.[ch]]
Include AIX headers for authentication functions and make calls match Include AIX headers for authentication functions and make calls match
prototypes. Test for and handle 3-args and 4-arg variants of loginfailed. prototypes. Test for and handle 3-arg and 4-arg variants of loginfailed.
- (dtucker) [session.c] Check return value of setpcred(). - (dtucker) [session.c] Check return value of setpcred().
- (dtucker) [auth-passwd.c auth.c session.c sshd.c port-aix.c port-aix.h] - (dtucker) [auth-passwd.c auth.c session.c sshd.c port-aix.c port-aix.h]
Convert aixloginmsg into platform-independant Buffer loginmsg. Convert aixloginmsg into platform-independant Buffer loginmsg.
@ -670,4 +674,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2849 2003/07/08 12:59:59 dtucker Exp $ $Id: ChangeLog,v 1.2850 2003/07/14 06:21:44 dtucker Exp $

View File

@ -1,4 +1,4 @@
/* $Id: acconfig.h,v 1.158 2003/07/08 10:52:13 dtucker Exp $ */ /* $Id: acconfig.h,v 1.159 2003/07/14 06:21:44 dtucker Exp $ */
/* /*
* Copyright (c) 1999-2003 Damien Miller. All rights reserved. * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
@ -110,8 +110,8 @@
/* Define if you want to enable AIX4's authenticate function */ /* Define if you want to enable AIX4's authenticate function */
#undef WITH_AIXAUTHENTICATE #undef WITH_AIXAUTHENTICATE
/* Define if your AIX loginfailed() function takes 3 arguments (AIX <= 5.1) */ /* Define if your AIX loginfailed() function takes 4 arguments (AIX >= 5.2) */
#undef AIX_LOGINFAILED_3ARG #undef AIX_LOGINFAILED_4ARG
/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */ /* Define if you have/want arrays (cluster-wide session managment, not C arrays) */
#undef WITH_IRIX_ARRAY #undef WITH_IRIX_ARRAY

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.132 2003/07/08 10:52:13 dtucker Exp $ # $Id: configure.ac,v 1.133 2003/07/14 06:21:44 dtucker Exp $
AC_INIT AC_INIT
AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_SRCDIR([ssh.c])
@ -75,25 +75,26 @@ case "$host" in
AC_MSG_RESULT($blibflags) AC_MSG_RESULT($blibflags)
fi fi
LDFLAGS="$saved_LDFLAGS" LDFLAGS="$saved_LDFLAGS"
# Check for authenticate. Might be in libs.a on older AIXes dnl Check for authenticate. Might be in libs.a on older AIXes
AC_CHECK_FUNC(authenticate, [with_aixauthenticate=1], AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
[AC_CHECK_LIB(s,authenticate, [AC_CHECK_LIB(s,authenticate,
[ with_aixaixauthenticate=1 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
LIBS="$LIBS -ls" LIBS="$LIBS -ls"
]) ])
]) ])
# Check if loginfailed takes 3 arguments (AIX <= 5.1) dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
if (test "x$with_aixauthenticate" = "x1" ); then AC_CHECK_DECL(loginfailed,
AC_DEFINE(WITH_AIXAUTHENTICATE) [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
AC_MSG_CHECKING(if loginfailed takes 3 arguments) AC_TRY_COMPILE(
AC_TRY_COMPILE(
[#include <usersec.h>], [#include <usersec.h>],
[(void)loginfailed("user","host","tty");], [(void)loginfailed("user","host","tty",0);],
[AC_MSG_RESULT(yes) [AC_MSG_RESULT(yes)
AC_DEFINE(AIX_LOGINFAILED_3ARG)], AC_DEFINE(AIX_LOGINFAILED_4ARG)],
[AC_MSG_RESULT(no)] [AC_MSG_RESULT(no)]
) )],
fi [],
[#include <usersec.h>]
)
AC_DEFINE(BROKEN_GETADDRINFO) AC_DEFINE(BROKEN_GETADDRINFO)
AC_DEFINE(BROKEN_REALPATH) AC_DEFINE(BROKEN_REALPATH)
dnl AIX handles lastlog as part of its login message dnl AIX handles lastlog as part of its login message

View File

@ -92,10 +92,10 @@ record_failed_login(const char *user, const char *ttyname)
{ {
char *hostname = get_canonical_hostname(options.use_dns); char *hostname = get_canonical_hostname(options.use_dns);
# ifdef AIX_LOGINFAILED_3ARG # ifdef AIX_LOGINFAILED_4ARG
loginfailed((char *)user, hostname, (char *)ttyname);
# else
loginfailed((char *)user, hostname, (char *)ttyname, AUDIT_FAIL_AUTH); loginfailed((char *)user, hostname, (char *)ttyname, AUDIT_FAIL_AUTH);
# else
loginfailed((char *)user, hostname, (char *)ttyname);
# endif # endif
} }
# endif /* CUSTOM_FAILED_LOGIN */ # endif /* CUSTOM_FAILED_LOGIN */