]> andersk Git - openssh.git/commitdiff
- Fill in ut_utaddr utmp field. Report from Benjamin Charron
authordamien <damien>
Thu, 30 Dec 1999 22:42:24 +0000 (22:42 +0000)
committerdamien <damien>
Thu, 30 Dec 1999 22:42:24 +0000 (22:42 +0000)
   <iretd@bigfoot.com>

ChangeLog
TODO
acconfig.h
configure.in
login.c

index d36fbc07976d4b07df04202952ff963fd4dc498e..9221ae9626ec13a76929ff14cb42be5db06e2efe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
    <Franz.Sirl-kernel@lauterbach.com>
  - Prevent typedefs from being compiled more than once. Report from 
    Marc G. Fournier <marc.fournier@acadiau.ca>
+ - Fill in ut_utaddr utmp field. Report from Benjamin Charron
+   <iretd@bigfoot.com>
 
 19991230
  - OpenBSD CVS updates:
diff --git a/TODO b/TODO
index ddd54621bcd4a523105468fb3d02c4b7fb955d0c..5d0ba5fd03614e1064e6b36eb5039778f3068c90 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,3 +7,17 @@
 - Replace the horror in acconfig.h which tries to comphensate for the 
   lack of u_intXX_t types. There must be a better way.
 
+- Hanging on logout:
+
+localhost$ ssh remotehost
+remotehost$ sleep 20 &
+remotehost$ logout
+(ssh hangs at logout for 20 seconds)
+
+Worse:
+
+localhost$ ssh root@remotehost
+remotehost# httpd
+remotehost# logout
+(ssh hangs at logout forever)
+
index 3331a13f952a6c0573fb86893594c193134fd3cc..d0feb370daa52492d59f8bc5fda2d39192864df6 100644 (file)
 /* Define is utmpx.h has a ut_host field */
 #undef HAVE_HOST_IN_UTMPX
 
+/* Define is utmp.h has a ut_addr field */
+#undef HAVE_ADDR_IN_UTMP
+
+/* Define is utmpx.h has a ut_addr field */
+#undef HAVE_ADDR_IN_UTMPX
+
 /* Define is utmpx.h has a syslen field */
 #undef HAVE_SYSLEN_IN_UTMPX
 
index dd3e16841248ceefad9b2322ac274a1b5c02a3e3..e9b2e69b034a0443a0f3b293baccc9d6cec24d37 100644 (file)
@@ -325,6 +325,16 @@ AC_EGREP_HEADER(ut_id, utmp.h,
        [AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ], 
        [AC_MSG_RESULT(no)]
 )
+AC_MSG_CHECKING([whether utmp.h has ut_addr field])
+AC_EGREP_HEADER(ut_addr, utmp.h, 
+       [AC_DEFINE(HAVE_ADDR_IN_UTMP) AC_MSG_RESULT(yes); ], 
+       [AC_MSG_RESULT(no)]
+)
+AC_MSG_CHECKING([whether utmpx.h has ut_addr field])
+AC_EGREP_HEADER(ut_addr, utmpx.h, 
+       [AC_DEFINE(HAVE_ADDR_IN_UTMP) AC_MSG_RESULT(yes); ], 
+       [AC_MSG_RESULT(no)]
+)
 
 dnl Look for lastlog location
 AC_ARG_WITH(lastlog,
diff --git a/login.c b/login.c
index 6f2c26937c12e34750107d3b94bc6ddac8399f25..fc3eef12a2c6b93a708ffd673471b0bb666abe22 100644 (file)
--- a/login.c
+++ b/login.c
@@ -159,6 +159,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
 #if defined(HAVE_HOST_IN_UTMP)
        strncpy(u.ut_host, host, sizeof(u.ut_host));
 #endif
+#if defined(HAVE_ADDR_IN_UTMP)
+       u.ut_addr = addr->sin_addr.s_addr;
+#endif
 
 #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
        memset(&utx, 0, sizeof(utx));
@@ -176,6 +179,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
        strncpy(utx.ut_host, host, sizeof(utx.ut_host));
 #  endif /* HAVE_SYSLEN_IN_UTMPX */
 # endif
+# if defined(HAVE_ADDR_IN_UTMPX)
+       utx.ut_addr = addr->sin_addr.s_addr;
+# endif
 #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
 
 /*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/
This page took 0.053383 seconds and 5 git commands to generate.