Date: Thu, 6 Feb 2003 19:47:16 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD-questions@FreeBSD.ORG Subject: Re: How to change Telnet Prelogin message? Message-ID: <20030206194716.GC58257@happy-idiot-talk.infracaninophi> In-Reply-To: <20030206192321.GA538@sub21-156.member.dsl-only.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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'. Interesting. The source code seems pretty clear in that it only looks at the 'im' property: .../src/libexec/telnetd/telnetd.c at about line 770 /* * 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. */ if (getent(defent, "default") == 1) { char *cp=defstrs; HE = Getstr("he", &cp); HN = Getstr("hn", &cp); IM = Getstr("im", &cp); if (HN && *HN) (void) strlcpy(host_name, HN, sizeof(host_name)); if (IM == 0) IM = strdup(""); } else { IM = strdup(DEFAULT_IM); HE = 0; } Looks like it's time to send-pr. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030206194716.GC58257>