new login library alpha release

Andre Lucas andre.lucas at dial.pipex.com
Fri Jan 14 09:14:24 EST 2000


Hi,

I've just posted an early alpha of a new login record library 'liblogin'
to my website -> http://dspace.dial.pipex.com/andre.lucas/openssh.html .

It's released as a patch, and it doesn't enable itself by default. Read
the instructions first!

This release is missing a lot of functionality, but is tested and
working on Linux (RH6.0 anyway) and OpenBSD. Why you might want it on
OpenBSD is covered on the web page... It's a good thing.

It won't work properly on platforms using direct utmp[x], wtmp[x] or the
putut[x]line() methods. I want to see how people get on with it before
implementing the rest.

Essentially, the library tries to abstract the simple-sounding task of
recording who logged in and when away from the very ugly
system-dependent implementation of this on various UNIX-like OSes. As
Damien said before on the list, it's the nastiest part of porting
OpenSSH to new platforms.

The old record_login() function (login.c) is about 100 lines of
code, full of #ifdef statements. The liblogin version is this:

void record_login( <params> ) {
  struct logininfo *li;

  li = liblogin_alloc_entry(pid, user, host, ttyname);
  liblogin_set_ip4(li, addr);
  liblogin_login(li);
}

A good deal less hassle. Of course, the hassle has moved somewhere else,
but, because it's liblogin's raison d'etre, it's designed with
portability in mind and hopefully it will be easier to manage.

If you have a supported OS for this, please check it out and let me know
how you get on.

Ta,
-Andre

-- 
Andre Lucas <andre.lucas at dial.pipex.com>
http://dspace.dial.pipex.com/andre.lucas/





More information about the openssh-unix-dev mailing list