Don't attempt authentication at all if it has been disabled via '-a off'.
This works around a bug in HP-UX's telnet client and also gives a much saner user experience when using FreeBSD's telnet client. PR: bin/19405 Submitted by: Joel Ray Holveck joelh of gnu.org MFC after: 1 month git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@180931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
parent
dea97c6292
commit
d76e719277
|
@ -553,8 +553,10 @@ willoption(int option)
|
|||
|
||||
#ifdef AUTHENTICATION
|
||||
case TELOPT_AUTHENTICATION:
|
||||
func = auth_request;
|
||||
changeok++;
|
||||
if (auth_level >= 0) {
|
||||
func = auth_request;
|
||||
changeok++;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -481,11 +481,13 @@ getterminaltype(char *name undef2)
|
|||
/*
|
||||
* Handle the Authentication option before we do anything else.
|
||||
*/
|
||||
send_do(TELOPT_AUTHENTICATION, 1);
|
||||
while (his_will_wont_is_changing(TELOPT_AUTHENTICATION))
|
||||
ttloop();
|
||||
if (his_state_is_will(TELOPT_AUTHENTICATION)) {
|
||||
retval = auth_wait(name);
|
||||
if (auth_level >= 0) {
|
||||
send_do(TELOPT_AUTHENTICATION, 1);
|
||||
while (his_will_wont_is_changing(TELOPT_AUTHENTICATION))
|
||||
ttloop();
|
||||
if (his_state_is_will(TELOPT_AUTHENTICATION)) {
|
||||
retval = auth_wait(name);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue