From owner-freebsd-current@FreeBSD.ORG Wed Nov 15 04:10:33 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A2DD16A4C8 for ; Wed, 15 Nov 2006 04:10:33 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAD6C43D58 for ; Wed, 15 Nov 2006 04:10:32 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id CBE891A3C1C for ; Tue, 14 Nov 2006 20:10:32 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 6C45E51322; Tue, 14 Nov 2006 23:10:21 -0500 (EST) Date: Tue, 14 Nov 2006 23:10:21 -0500 From: Kris Kennaway To: current@FreeBSD.org Message-ID: <20061115041021.GA97078@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Cc: Subject: kern.pts.enable=1 forces tcsh autologout X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 04:10:33 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline When kern.pts.enable=1, the ptys are named /dev/pts/, and tcsh doesn't correctly recognize that it's a pty and it should disable autologout. Actually it does seem to have some code but it seems to be incorrect: if (loginsh || (uid == 0)) { if (*cp) { /* only for login shells or root and we must have a tty */ if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) { cp = cp2 + 1; } else cp2 = cp; if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) || ((Strncmp(cp, STRpts, 3) == 0) && cp[3] == '/'))) { if (getenv("DISPLAY") == NULL) { /* NOT on X window shells */ set(STRautologout, Strsave(STRdefautologout), VAR_READWRITE); } } } } Kris --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFWpMsWry0BWjoQKURAoJqAKCHMvd6rli9TYTqIocqC+1D9Ec3WgCaA1ga foY4eOCvMZKA044s4VMXOaA= =sY6f -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--