Patch: utmp problems under Solaris 2.x
Badura, Christoph
Christoph.Badura at Dresdner-Bank.com
Tue May 16 03:50:00 EST 2000
A couple of people have noticed inconsistent utmp entries under Solaris 2.x.
The following patch solves these for me under SunOS 5.6. Basically,
everything in bsd-login.c:login() but the last three statements are in
the "#ifdef USE_UTMPX" block are superfluous and harmful. The utmp
and wtmp files are kept in sync by the routines that update the -x versions.
This should probably be cleaned up.
*** bsd-login.c.orig Mon May 1 14:53:53 2000
--- bsd-login.c Mon May 15 18:44:09 2000
***************
*** 110,116 ****
#endif
#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;
--- 110,116 ----
#endif
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
struct utmpx *old_utx;
! #else /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
register int fd;
int tty;
***************
*** 169,174 ****
--- 169,175 ----
(void)write(fd, utp, sizeof(struct utmp));
(void)close(fd);
}
+ #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
old_utx = pututxline(utx);
# ifdef HAVE_UPDWTMPX
-chb
More information about the openssh-unix-dev
mailing list