mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180931
@ -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
Block a user