From owner-cvs-all Sat Apr 20 5:23:10 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E756537B416; Sat, 20 Apr 2002 05:23:04 -0700 (PDT) Received: (from des@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3KCN4v46443; Sat, 20 Apr 2002 05:23:04 -0700 (PDT) (envelope-from des) Message-Id: <200204201223.g3KCN4v46443@freefall.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 20 Apr 2002 05:23:04 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libutil login.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG des 2002/04/20 05:23:04 PDT Modified files: lib/libutil login.c Log: 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 Revision Changes Path 1.9 +9 -3 src/lib/libutil/login.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message