From owner-freebsd-current@FreeBSD.ORG Fri Mar 27 15:44:12 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32B7E106566C; Fri, 27 Mar 2009 15:44:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BEAEC8FC18; Fri, 27 Mar 2009 15:44:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C8DBF1CF09; Fri, 27 Mar 2009 16:44:10 +0100 (CET) Date: Fri, 27 Mar 2009 16:44:10 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20090327154410.GL73108@hoeg.nl> References: <370833.32038.qm@web63903.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QqzFzR/RUlLahzby" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Barney Cordoba , mail25@bzerk.org, current@freebsd.org Subject: Re: Telnet root login 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: Fri, 27 Mar 2009 15:44:12 -0000 --QqzFzR/RUlLahzby Content-Type: multipart/mixed; boundary="hdW7zL/qDS6RXdAL" Content-Disposition: inline --hdW7zL/qDS6RXdAL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Barney, * Robert Watson wrote: > if ((tty =3D strrchr(ttyn, '/')) !=3D NULL) > ++tty; > else > tty =3D ttyn; Does the attached patch for login(1) fix the issues you're seeing? If it does, I'll commit it to SVN. Thanks! --=20 Ed Schouten WWW: http://80386.nl/ --hdW7zL/qDS6RXdAL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="login.diff" Content-Transfer-Encoding: quoted-printable Index: login.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- login.c (revision 190463) +++ login.c (working copy) @@ -245,8 +245,8 @@ (void)snprintf(tname, sizeof(tname), "%s??", _PATH_TTY); ttyn =3D tname; } - if ((tty =3D strrchr(ttyn, '/')) !=3D NULL) - ++tty; + if (strncmp(ttyn, _PATH_DEV, sizeof _PATH_DEV - 1) =3D=3D 0) + tty =3D ttyn + sizeof _PATH_DEV - 1; else tty =3D ttyn; =20 --hdW7zL/qDS6RXdAL-- --QqzFzR/RUlLahzby Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknM9EoACgkQ52SDGA2eCwWIKQCfXqtCUvhbAjBwaDXLciI+VN2o WtcAn3W7WgzjuEhjrtV/bqfFUNMlQzT9 =N4v6 -----END PGP SIGNATURE----- --QqzFzR/RUlLahzby--