Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/telnet fix spelling of cpp symbol (ENCRYPT vs ENCRYP...



details:   https://anonhg.NetBSD.org/src/rev/363619e61b35
branches:  trunk
changeset: 504477:363619e61b35
user:      assar <assar%NetBSD.org@localhost>
date:      Sun Mar 04 01:51:05 2001 +0000

description:
fix spelling of cpp symbol (ENCRYPT vs ENCRYPTION).
enable encryption with autologin.
fixes PR 12226

diffstat:

 usr.bin/telnet/main.c   |  19 ++++++++++++++++---
 usr.bin/telnet/telnet.c |   8 ++++----
 2 files changed, 20 insertions(+), 7 deletions(-)

diffs (78 lines):

diff -r a6c46d40c178 -r 363619e61b35 usr.bin/telnet/main.c
--- a/usr.bin/telnet/main.c     Sun Mar 04 01:50:53 2001 +0000
+++ b/usr.bin/telnet/main.c     Sun Mar 04 01:51:05 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.14 2001/01/03 12:41:00 mjl Exp $    */
+/*     $NetBSD: main.c,v 1.15 2001/03/04 01:51:05 assar Exp $  */
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.14 2001/01/03 12:41:00 mjl Exp $");
+__RCSID("$NetBSD: main.c,v 1.15 2001/03/04 01:51:05 assar Exp $");
 #endif
 #endif /* not lint */
 
@@ -269,7 +269,9 @@
 #endif
                        break;
                case 'l':
-                       autologin = 1;
+                       if(autologin == 0) {
+                               autologin = -1;
+                       }
                        user = optarg;
                        break;
                case 'n':
@@ -327,6 +329,17 @@
                        /* NOTREACHED */
                }
        }
+
+       if (autologin == -1) {          /* esc%magic.fi@localhost; 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;
 
diff -r a6c46d40c178 -r 363619e61b35 usr.bin/telnet/telnet.c
--- a/usr.bin/telnet/telnet.c   Sun Mar 04 01:50:53 2001 +0000
+++ b/usr.bin/telnet/telnet.c   Sun Mar 04 01:51:05 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: telnet.c,v 1.16 2000/06/22 06:47:48 thorpej Exp $      */
+/*     $NetBSD: telnet.c,v 1.17 2001/03/04 01:51:05 assar Exp $        */
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)telnet.c   8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnet.c,v 1.16 2000/06/22 06:47:48 thorpej Exp $");
+__RCSID("$NetBSD: telnet.c,v 1.17 2001/03/04 01:51:05 assar Exp $");
 #endif
 #endif /* not lint */
 
@@ -427,10 +427,10 @@
            }
        }
        set_my_state_do(option);
-#ifdef ENCRYPT
+#ifdef ENCRYPTION
        if (option == TELOPT_ENCRYPT)
                encrypt_send_support();
-#endif /* ENCRYPT */
+#endif /* ENCRYPTION */
 }
 
        void



Home | Main Index | Thread Index | Old Index