OpenSSH 1.2.3 on AIX 4.3.3
Tom Bertelson
tbert at abac.com
Fri Apr 21 23:43:59 EST 2000
Hmph. I wish I had checked the list before I wasted a half-day on this.
Yes, the problem exists under AIX (mine's 4.3.1). Here's the patch I
came up with, which may be a little more straightforward than the
original. I confirmed that it works under Solaris 2.[67] too.
Don't forget to run autoconf.
--- bsd-login.c.orig Sat Dec 25 18:21:48 1999
+++ bsd-login.c Thu Apr 20 18:26:41 2000
@@ -65,15 +65,23 @@
struct utmp *utp;
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
{
+#if defined(HAVE_PUTUTLINE)
+ struct utmp *old_utp;
+#else
#if defined(HAVE_HOST_IN_UTMP)
struct utmp old_ut;
#endif
+ int tty;
+#endif /* HAVE_PUTUTLINE */
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
struct utmpx *old_utx;
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
register int fd;
- int tty;
+#if defined(HAVE_PUTUTLINE)
+ old_utp = pututline(utp);
+ endutent();
+#else
tty = ttyslot();
if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
@@ -100,6 +108,7 @@
(void)write(fd, utp, sizeof(struct utmp));
(void)close(fd);
}
+#endif /* HAVE_PUTUTLINE */
if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
(void)write(fd, utp, sizeof(struct utmp));
(void)close(fd);
--- config.h.in.orig Thu Apr 20 18:10:46 2000
+++ config.h.in Fri Apr 21 08:32:55 2000
@@ -187,6 +187,9 @@
/* Define if you have the openpty function. */
#undef HAVE_OPENPTY
+
+/* Define if you have the pututline function. */
+#undef HAVE_PUTUTLINE
/* Define if you have the rresvport_af function. */
#undef HAVE_RRESVPORT_AF
--- configure.in.orig Fri Mar 17 07:26:46 2000
+++ configure.in Fri Apr 21 08:23:28 2000
@@ -110,7 +110,7 @@
AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
# Checks for library functions.
-AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
+AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdtemp openpty pututline rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
AC_CHECK_FUNC(login,
[AC_DEFINE(HAVE_LOGIN)],
More information about the openssh-unix-dev
mailing list