mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
This commit is contained in:
parent
f7f1cc1518
commit
2e38385526
2 changed files with 11 additions and 7 deletions
|
|
@ -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 a new issue