Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2009 16:44:10 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Barney Cordoba <barney_cordoba@yahoo.com>, mail25@bzerk.org, current@freebsd.org
Subject:   Re: Telnet root login
Message-ID:  <20090327154410.GL73108@hoeg.nl>
In-Reply-To: <alpine.BSF.2.00.0903271204400.60642@fledge.watson.org>
References:  <370833.32038.qm@web63903.mail.re1.yahoo.com> <alpine.BSF.2.00.0903271204400.60642@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <rwatson@FreeBSD.org> 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 <ed@80386.nl>
 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090327154410.GL73108>