K 10 svn:author V 3 des K 8 svn:date V 27 2002-04-20T12:23:04.000000Z K 7 svn:log V 650 Fix for the sshd(8) utmp problem. Previously, login(3) would ignore the tty named by its argument and use ttyslot(3) instead to determine what slot to use. The problem is that sshd(8) calls pam_open_session(3) before forking the child (as it should), at which point it does not have a controlling terminal. Also, ttyslot(3) is very crude as it assumes fd 0, 1 or 2 refers to the controlling terminal, which is usually (but not always) the case. Instead of using ttyslot(3) to determine the slot number, look up the specified tty in /etc/ttys ourselves (this is what ttyslot(3) does anyway). (perforce change 9969) Sponsored by: DARPA, NAI Labs END