- Fill in ut_utaddr utmp field. Report from Benjamin Charron
<iretd@bigfoot.com>
This commit is contained in:
parent
b2532b3be4
commit
3131d8bc71
|
@ -8,6 +8,8 @@
|
||||||
<Franz.Sirl-kernel@lauterbach.com>
|
<Franz.Sirl-kernel@lauterbach.com>
|
||||||
- Prevent typedefs from being compiled more than once. Report from
|
- Prevent typedefs from being compiled more than once. Report from
|
||||||
Marc G. Fournier <marc.fournier@acadiau.ca>
|
Marc G. Fournier <marc.fournier@acadiau.ca>
|
||||||
|
- Fill in ut_utaddr utmp field. Report from Benjamin Charron
|
||||||
|
<iretd@bigfoot.com>
|
||||||
|
|
||||||
19991230
|
19991230
|
||||||
- OpenBSD CVS updates:
|
- OpenBSD CVS updates:
|
||||||
|
|
14
TODO
14
TODO
|
@ -7,3 +7,17 @@
|
||||||
- Replace the horror in acconfig.h which tries to comphensate for the
|
- Replace the horror in acconfig.h which tries to comphensate for the
|
||||||
lack of u_intXX_t types. There must be a better way.
|
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)
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,12 @@
|
||||||
/* Define is utmpx.h has a ut_host field */
|
/* Define is utmpx.h has a ut_host field */
|
||||||
#undef HAVE_HOST_IN_UTMPX
|
#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 */
|
/* Define is utmpx.h has a syslen field */
|
||||||
#undef HAVE_SYSLEN_IN_UTMPX
|
#undef HAVE_SYSLEN_IN_UTMPX
|
||||||
|
|
||||||
|
|
10
configure.in
10
configure.in
|
@ -325,6 +325,16 @@ AC_EGREP_HEADER(ut_id, utmp.h,
|
||||||
[AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ],
|
[AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ],
|
||||||
[AC_MSG_RESULT(no)]
|
[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
|
dnl Look for lastlog location
|
||||||
AC_ARG_WITH(lastlog,
|
AC_ARG_WITH(lastlog,
|
||||||
|
|
8
login.c
8
login.c
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: login.c,v 1.15 1999/12/28 15:32:22 damien Exp $");
|
RCSID("$Id: login.c,v 1.16 1999/12/30 22:42:24 damien Exp $");
|
||||||
|
|
||||||
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
||||||
# include <utmpx.h>
|
# include <utmpx.h>
|
||||||
|
@ -159,6 +159,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
|
||||||
#if defined(HAVE_HOST_IN_UTMP)
|
#if defined(HAVE_HOST_IN_UTMP)
|
||||||
strncpy(u.ut_host, host, sizeof(u.ut_host));
|
strncpy(u.ut_host, host, sizeof(u.ut_host));
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAVE_ADDR_IN_UTMP)
|
||||||
|
u.ut_addr = addr->sin_addr.s_addr;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
||||||
memset(&utx, 0, sizeof(utx));
|
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));
|
strncpy(utx.ut_host, host, sizeof(utx.ut_host));
|
||||||
# endif /* HAVE_SYSLEN_IN_UTMPX */
|
# endif /* HAVE_SYSLEN_IN_UTMPX */
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(HAVE_ADDR_IN_UTMPX)
|
||||||
|
utx.ut_addr = addr->sin_addr.s_addr;
|
||||||
|
# endif
|
||||||
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
|
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
|
||||||
|
|
||||||
/*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/
|
/*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/
|
||||||
|
|
Loading…
Reference in New Issue