From d6f52a511f9631aed8f82bcd3fab8cbf17e307c4 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 3 Nov 1997 06:08:26 +0000 Subject: [PATCH] (terminaltypeok): always return OK. It used to call `tgetent' to figure if it was a defined terminal type. It's possible to overflow tgetent so that's a bad idea. The worst that could happen by saying yes to all terminals is that the user ends up with a terminal that has no definition on the local system. And besides, most telnet client has no support for falling back to a different terminal type. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3760 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/telnet/telnetd/telnetd.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/appl/telnet/telnetd/telnetd.c b/appl/telnet/telnetd/telnetd.c index 6639d4907..7c7e4e966 100644 --- a/appl/telnet/telnetd/telnetd.c +++ b/appl/telnet/telnetd/telnetd.c @@ -647,21 +647,7 @@ _gettermname() int terminaltypeok(char *s) { - char buf[1024]; - - if (terminaltype == NULL) - return(1); - - /* - * tgetent() will return 1 if the type is known, and - * 0 if it is not known. If it returns -1, it couldn't - * open the database. But if we can't open the database, - * it won't help to say we failed, because we won't be - * able to verify anything else. So, we treat -1 like 1. - */ - if (tgetent(buf, s) == 0) - return(0); - return(1); + return 1; } -- 2.11.4.GIT