Subject: Re: $HOSTALIASES thing.
To: None <,>
From: Greg A. Woods <>
List: tech-kern
Date: 11/04/2000 02:45:58
[ On Saturday, November 4, 2000 at 16:00:53 (+0900), wrote: ]
> Subject: Re: $HOSTALIASES thing.
> 	i have the same question.  how do the daemon authenticate the
> 	guy who asked for wtmp/utmp writes?

The first obvious check is (for a session start record) to ensure that
the user owns the tty he's beginning his new session on.  Some other
sanity checks can be done to further enhance the reliability and
integrity of this scheme too (such as checking that the user does not
have write permission in /dev, etc.)

Authenticating a session-end record is more difficult but it might be
possible to arrange it such that the tty is changed to be owned by root
(or some neutral unprivileged user) once the user is logged out (perhaps
with ttyaction) and thus the xterm process still running as the user
could request a session end record be recorded and the daemon could
verify that the tty had been properly released.  (This is much easier
with init and getty, of course, but for ptys it's currently
problematical, which is why I've decided that a kernel based pty cloning
scheme is a superior solution all around -- it solves several problems
all at once in a reasonably elegant fashion.)

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>