From owner-freebsd-questions Thu Feb 6 13:55:16 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD17137B401 for ; Thu, 6 Feb 2003 13:55:13 -0800 (PST) Received: from sub21-156.member.dsl-only.net (sub21-156.member.dsl-only.net [63.105.21.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B7C43FBD for ; Thu, 6 Feb 2003 13:55:12 -0800 (PST) (envelope-from nkinkade@sub21-156.member.dsl-only.net) Received: from nkinkade by sub21-156.member.dsl-only.net with local (Exim 4.10) id 18gtzE-0000Ku-00 for FreeBSD-questions@FreeBSD.ORG; Thu, 06 Feb 2003 13:55:12 -0800 Date: Thu, 6 Feb 2003 13:55:12 -0800 From: Nathan Kinkade To: FreeBSD-questions@FreeBSD.ORG Subject: Re: How to change Telnet Prelogin message? Message-ID: <20030206215512.GB538@sub21-156.member.dsl-only.net> Reply-To: nkinkade@dsl-only.net Mail-Followup-To: FreeBSD-questions@FreeBSD.ORG References: <1461.192.168.1.10.1044505050.squirrel@email.unixhideout.com> <20030206044512.GR87743@sub21-156.member.dsl-only.net> <20030206092721.GB53194@happy-idiot-talk.infracaninophi> <20030206192321.GA538@sub21-156.member.dsl-only.net> <20030206194716.GC58257@happy-idiot-talk.infracaninophi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <20030206194716.GC58257@happy-idiot-talk.infracaninophi> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 06, 2003 at 07:47:16PM +0000, Matthew Seaman wrote: > On Thu, Feb 06, 2003 at 11:23:21AM -0800, Nathan Kinkade wrote: > > I guess I wasn't paying close enough attention to the original posters > > question. I somehow missed the "pre". In any case, all this has > > prompted me to play around with pre-login messages. Using gettytab I > > can alter the pre-login message for telnet sessions by changing the 'im' > > capability in gettytab, but for the life of me I can't seem to get > > telnetd to recognize the 'if' capability. The console responds to both, > > but telnetd seems to ignore 'if'. The perms on /etc/issue are 644. I > > don't run inetd, but just for experiment I uncommented telnetd and > > launched and inetd for testing. Can anyone explain why telnetd might > > ignore the 'if' capability specified in the 'default' heading of > > gettytab? The telnetd man page clearly states that if 'if' is present > > it will override 'im'. >=20 > Interesting. The source code seems pretty clear in that it only looks > at the 'im' property: >=20 > .../src/libexec/telnetd/telnetd.c at about line 770 >=20 > /* > * Show banner that getty never gave. > * > * We put the banner in the pty input buffer. This way, it > * gets carriage return null processing, etc., just like all > * other pty --> client data. > */ >=20 > if (getent(defent, "default") =3D=3D 1) { > char *cp=3Ddefstrs; >=20 > HE =3D Getstr("he", &cp); > HN =3D Getstr("hn", &cp); > IM =3D Getstr("im", &cp); > if (HN && *HN) > (void) strlcpy(host_name, HN, sizeof(host_name)); > if (IM =3D=3D 0) > IM =3D strdup(""); > } else { > IM =3D strdup(DEFAULT_IM); > HE =3D 0; > } >=20 > Looks like it's time to send-pr. >=20 > Cheers, >=20 > Matthew Thanks Matthew. I did a bit of searching and couldn't find this problem mentioned anywhere else. I have submitted a PR with id "docs/48018". Nathan --=20 GPG Public Key ID: 0x4250A04C gpg --keyserver pgp.mit.edu --recv-keys 4250A04C http://63.105.21.156/gpg_nkinkade_4250A04C.asc --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+QtnAWZYS9EJQoEwRAo14AJsFlAb34/i9R5utdZ6rQraaHWmJ4QCg1g/C qURBrJsmi3zRHxjWx09Sk84= =hCk6 -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message