openssh 2.2.0p1 and finger

Kevin Steves stevesk at sweden.hp.com
Thu Sep 7 05:09:26 EST 2000


On Wed, 6 Sep 2000, Stephan Hendl wrote:
: just I installed OpenSSH 2.2.0p1 on a HPUX-11 machine and it works.
: But when I connected to the machine and give "finger -R"-command
: then in the "Where"-column I see the hostname of the openssh-server
: instead of the hostname where I came from.
: 
: Does anybody have an idea?

This is my analysis having not looked much at loginrec.c before:

finger -R is looking at ut_addr in the utmp struct for Where.  HP-UX
11.0 has both utmp and utmpx and by default we use the library interface
to write utmp* entries.  The problem is that both are used: first
pututline(), then pututxline().  We should use one *or* the other
because pututxline() overwrites pututline() data:

     pututline()     Writes out the supplied utmp structure into the
                     utmp file, translates the supplied utmp structure
                     int a utmpx structure and writes it to a utmpx
                     file. 

     pututxline()    Writes out the supplied utmpx structure into the
                     utmpx file, translates the supplied utmpx
                     structure into a utmp structure and writes it to a
                     utmp file.

What you see results from the fact that ut_addr isn't set for utmpx
data:

# ifdef HAVE_ADDR_IN_UTMPX
	/* FIXME: (ATL) not supported yet */
# endif

If you build with #define DISABLE_UTMPX finger -R works as expected.
However, I think we should use utmpx (longer host names for one), and
it's just a question of when everything is supported.  So the best fix I
feel is to define DISABLE_UTMP for 11.0 (and maybe 10.20 though I'm not
using that myself) and finish up utmpx support in loginrec.

Also, HAVE_ENDUTENT and HAVE_ENDUTXENT are not set in configure; should
they be?






More information about the openssh-unix-dev mailing list