enable auto-negotiation of encrypt and decrypt

git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@74138 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
assar 2001-03-12 03:54:48 +00:00
parent ed8b315538
commit cd5df88636

View File

@ -284,6 +284,8 @@ main(argc, argv)
break;
case 'l':
autologin = 1;
if(autologin == 0)
autologin = -1;
user = optarg;
break;
case 'n':
@ -344,6 +346,17 @@ main(argc, argv)
/* NOTREACHED */
}
}
if (autologin == -1) { /* esc@magic.fi; force */
#if defined(AUTHENTICATION)
autologin = 1;
#endif
#if defined(ENCRYPTION)
encrypt_auto(1);
decrypt_auto(1);
#endif
}
if (autologin == -1)
autologin = (rlogin == _POSIX_VDISABLE) ? 0 : 1;