[1102] in linux-net channel archive
Re: login, telnetd and utmp
daemon@ATHENA.MIT.EDU (Marek Michalkiewicz)
Thu Sep 14 21:31:12 1995
From: Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>
To: tytso@MIT.EDU (Theodore Ts'o)
Date: Thu, 14 Sep 1995 20:47:23 +0200 (MET DST)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <9509141712.AA18073@dcl.MIT.EDU> from "Theodore Ts'o" at Sep 14, 95 01:12:53 pm
Theodore Ts'o:
>
> >- modify login to require a valid utmp entry for the current process
> > (like SysV login does) and don't fill in the ut_addr field
>
> Hence, I think the login program should create a utmp entry if one
> doesn't exist. If telnetd fills it in, then login won't bother; if
> we're running with an old version of telnetd that doesn't create a utmp
> entry, login will continue to function, although it won't have the speed
> benefits of eliminating some DNS lookups.
OK, but I think we should require a utmp entry to make sure that the user
does "exec login" and not just "login" from the shell prompt (the current
shell should be replaced by the login program). This will be possible
if telnetd and rlogind create utmp entries like getty does. I don't like
the BSD solution to this problem - from the FreeBSD login(1) man page:
"The standard shells, csh(1) and sh(1), do not fork before executing the
login utility." - bash doesn't do that, and I don't think it should treat
any program specially.
Backward compatibility should not be a problem - it will take a few months
before I will need beta testers for my version of the shadow suite, and it
will probably only support libc 5.x (because I use the NYS library), so if
we make the change in telnetd/rlogind (and any other programs which need
to execute /bin/login and don't create a utmp entry - are there any such
programs other than telnetd and rlogind?) now or in the near future (I can
provide patches if necessary), chances are everyone will be using the new
telnetd before the new login will be available.
Anyway, the change in login is optional (but solves another problem), the
current version should work just fine.
Thank you for your comments.
Marek