ANNOUNCE: openssh-1.2.1pre22

David Rankin drankin at bohemians.lexington.ky.us
Wed Dec 29 01:42:34 EST 1999


On Tue, Dec 28, 1999 at 03:51:39PM +1100, Damien Miller wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I have just uploaded 1.2.1pre22 to:
...
> I am interested in hearing success or failure stories from users of
> Solaris, HPUX, AIX, Irix, NetBSD and older Linux variants.

Wouldn't you know it, another NetBSD-caused utmp patch, this time for
ut_id. In case it will help in the future, here's what utmp.h basically
looks like on NetBSD:

           #define UT_NAMESIZE     8
           #define UT_LINESIZE     8
           #define UT_HOSTSIZE     16

           struct lastlog {
                   time_t  ll_time;
                   char    ll_line[UT_LINESIZE];
                   char    ll_host[UT_HOSTSIZE];
           };

           struct utmp {
                   char    ut_line[UT_LINESIZE];
                   char    ut_name[UT_NAMESIZE];
                   char    ut_host[UT_HOSTSIZE];
                   time_t  ut_time;
           };

Anyway, another unified diff to fix things.

Thanks,
David


--- configure.in.orig	Tue Dec 28 09:15:51 1999
+++ configure.in	Tue Dec 28 09:16:43 1999
@@ -290,6 +290,11 @@
 	[AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ], 
 	[AC_MSG_RESULT(no)]
 )
+AC_MSG_CHECKING([whether utmp.h has ut_id field])
+AC_EGREP_HEADER(ut_id, utmp.h, 
+	[AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ], 
+	[AC_MSG_RESULT(no)]
+)
 
 dnl Look for lastlog location
 AC_ARG_WITH(lastlog,
--- login.c.orig	Tue Dec 28 09:13:45 1999
+++ login.c	Tue Dec 28 09:15:30 1999
@@ -141,7 +141,9 @@
 	/* Construct an utmp/wtmp entry. */
 	memset(&u, 0, sizeof(u));
 	strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
+#if defined(HAVE_ID_IN_UTMP)
 	strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
+#endif /* defined(HAVE_ID_IN_UTMP) */ 
 	strncpy(u.ut_name, user, sizeof(u.ut_name));
 #if defined(HAVE_TV_IN_UTMP)
 	(void)gettimeofday(&u.ut_tv, NULL);
--- acconfig.h.orig	Tue Dec 28 09:17:10 1999
+++ acconfig.h	Tue Dec 28 09:17:38 1999
@@ -48,6 +48,9 @@
 /* Define is utmp.h has a ut_tv field */
 #undef HAVE_TV_IN_UTMP
 
+/* Define is utmp.h has a ut_id field */
+#undef HAVE_ID_IN_UTMP
+
 /* Define if you want to use utmpx */
 #undef USE_UTMPX
 





More information about the openssh-unix-dev mailing list