(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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user