aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/telnet/telnet/telnet.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-09-01 04:22:02 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-09-01 04:22:02 +0000
commit6aa216abc5318b619dcc5d31c0cdd6676ddd2aae (patch)
treea495fcff793426a1757a38638cafc0f809a67b10 /crypto/heimdal/appl/telnet/telnet/telnet.c
parent3aa267a21303bc70795f29b8677075b446f6a001 (diff)
downloadsrc-6aa216abc5318b619dcc5d31c0cdd6676ddd2aae.tar.gz
src-6aa216abc5318b619dcc5d31c0cdd6676ddd2aae.zip
MFC: Update Heimdal Kerberos to pre-0.5 around 2002/08/29.
Notes
Notes: svn path=/stable/4/; revision=102756
Diffstat (limited to 'crypto/heimdal/appl/telnet/telnet/telnet.c')
-rw-r--r--crypto/heimdal/appl/telnet/telnet/telnet.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/crypto/heimdal/appl/telnet/telnet/telnet.c b/crypto/heimdal/appl/telnet/telnet/telnet.c
index fab32a7ee875..bbc99990e201 100644
--- a/crypto/heimdal/appl/telnet/telnet/telnet.c
+++ b/crypto/heimdal/appl/telnet/telnet/telnet.c
@@ -36,7 +36,7 @@
#include <termcap.h>
#endif
-RCSID("$Id: telnet.c,v 1.31 2001/12/20 20:39:52 joda Exp $");
+RCSID("$Id: telnet.c,v 1.34 2002/05/03 10:19:43 joda Exp $");
#define strip(x) (eight ? (x) : ((x) & 0x7f))
@@ -2063,7 +2063,7 @@ my_telnet(char *user)
* is necessary so that authentication fails, we don't spin
* forever.
*/
- if (wantencryption) {
+ if (telnetport && wantencryption) {
extern int auth_has_failed;
time_t timeout = time(0) + 60;
@@ -2071,9 +2071,13 @@ my_telnet(char *user)
send_will(TELOPT_ENCRYPT, 1);
while (1) {
if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) {
- printf("\nServer refused to negotiate authentication,\n");
- printf("which is required for encryption.\n");
- Exit(1);
+ if (wantencryption == -1) {
+ break;
+ } else {
+ printf("\nServer refused to negotiate authentication,\n");
+ printf("which is required for encryption.\n");
+ Exit(1);
+ }
}
if (auth_has_failed) {
printf("\nAuthentication negotation has failed,\n");
@@ -2108,7 +2112,7 @@ my_telnet(char *user)
telnet_spin();
}
if (printed_encrypt) {
- printf("done.\n");
+ printf("Encryption negotiated.\n");
intr_waiting = 0;
setconnmode(0);
}