Subject: pam'd login(1) doesn't keep wtpmx(5) properly
To: None <current-users@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: current-users
Date: 03/02/2005 17:21:43
Hi -
just updated one box to -current and found the following:

If I use login(1) within an existing session, wtmpx(5) et al.
entries are overwritten or deleted.

An example session; the now-current box is zelz26.

zel459> ssh zelz26
[...]
$ who
drochner ttyp0    Mar  2 17:13  (zel459)
$ last|more
drochner  ttyp0    zel459           Wed Mar 02 17:13   still logged in
[...]
$ login drochner
[at this point, no passwd is asked for, which is different than before,
 but explained by the "pam_self" in pam.d/login]
[...]
$ who
drochner ttyp0    Mar  2 17:14
$ last|more
drochner  ttyp0                     Wed Mar 02 17:14   still logged in
[...]
$ logout
$ who
[nothing]
$ last|more
drochner  ttyp0                     Wed Mar 02 17:14 - 17:14  (00:00)
[...]


The "outer" entry is also overwritten if the "inner" login(1)
is to a different user.

best regards
Matthias