Source-Changes-HG archive

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

[src/netbsd-3]: src/libexec/telnetd Pull up revision 1.48 (requested by lha i...



details:   https://anonhg.NetBSD.org/src/rev/9fb479526fb6
branches:  netbsd-3
changeset: 576324:9fb479526fb6
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 27 09:20:13 2005 +0000

description:
Pull up revision 1.48 (requested by lha in ticket #502):
Remove static local variable so its easier to correctly use strlcpy.

diffstat:

 libexec/telnetd/telnetd.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 4bac58dee64b -r 9fb479526fb6 libexec/telnetd/telnetd.c
--- a/libexec/telnetd/telnetd.c Sun Jun 26 11:26:44 2005 +0000
+++ b/libexec/telnetd/telnetd.c Mon Jun 27 09:20:13 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: telnetd.c,v 1.46.2.1 2005/06/13 22:07:52 tron Exp $    */
+/*     $NetBSD: telnetd.c,v 1.46.2.2 2005/06/27 09:20:13 tron Exp $    */
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -65,7 +65,7 @@
 #if 0
 static char sccsid[] = "@(#)telnetd.c  8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnetd.c,v 1.46.2.1 2005/06/13 22:07:52 tron Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.46.2.2 2005/06/27 09:20:13 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -616,7 +616,7 @@
                     */
                     _gettermname();
                    if (strncmp(first, terminaltype, sizeof(first)) != 0) {
-                       (void) strlcpy(terminaltype, first, sizeof(first));
+                       (void) strlcpy(terminaltype, first, sizeof(terminaltype));
                    }
                    break;
                }
@@ -721,7 +721,7 @@
         */
        *user_name = 0;
        level = getterminaltype(user_name, sizeof(user_name));
-       setenv("TERM", terminaltype ? terminaltype : "network", 1);
+       setenv("TERM", terminaltype[0] ? terminaltype : "network", 1);
 
        /*
         * Start up the login process on the slave side of the terminal



Home | Main Index | Thread Index | Old Index