View | Details | Raw Unified | Return to bug 91593
Collapse All | Expand All

(-)heimdal-0.6.4/appl/telnet/telnetd/ext.h (-1 / +1 lines)
Lines 57-63 extern const char *new_login; Link Here
57
57
58
extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
58
extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
59
59
60
extern char	*terminaltype;
60
extern char	terminaltype[41];
61
61
62
/*
62
/*
63
 * I/O data buffers, pointers, and counters.
63
 * I/O data buffers, pointers, and counters.
(-)heimdal-0.6.4/appl/telnet/telnetd/global.c (-1 / +1 lines)
Lines 54-60 int require_otp; Link Here
54
54
55
slcfun	slctab[NSLC + 1];	/* slc mapping table */
55
slcfun	slctab[NSLC + 1];	/* slc mapping table */
56
56
57
char	*terminaltype;
57
char	terminaltype[41];
58
58
59
/*
59
/*
60
 * I/O data buffers, pointers, and counters.
60
 * I/O data buffers, pointers, and counters.
(-)heimdal-0.6.4/appl/telnet/telnetd/state.c (-6 / +5 lines)
Lines 939-945 suboption(void) Link Here
939
    }  /* end of case TELOPT_TSPEED */
939
    }  /* end of case TELOPT_TSPEED */
940
940
941
    case TELOPT_TTYPE: {		/* Yaaaay! */
941
    case TELOPT_TTYPE: {		/* Yaaaay! */
942
	static char terminalname[41];
942
	char *p;
943
943
944
	if (his_state_is_wont(TELOPT_TTYPE))	/* Ignore if option disabled */
944
	if (his_state_is_wont(TELOPT_TTYPE))	/* Ignore if option disabled */
945
	    break;
945
	    break;
Lines 949-957 suboption(void) Link Here
949
	    return;		/* ??? XXX but, this is the most robust */
949
	    return;		/* ??? XXX but, this is the most robust */
950
	}
950
	}
951
951
952
	terminaltype = terminalname;
952
	p = terminaltype;
953
953
954
	while ((terminaltype < (terminalname + sizeof terminalname-1)) &&
954
	while ((p < (terminaltype + sizeof terminaltype-1)) &&
955
	       !SB_EOF()) {
955
	       !SB_EOF()) {
956
	    int c;
956
	    int c;
957
957
Lines 959-968 suboption(void) Link Here
959
	    if (isupper(c)) {
959
	    if (isupper(c)) {
960
		c = tolower(c);
960
		c = tolower(c);
961
	    }
961
	    }
962
	    *terminaltype++ = c;    /* accumulate name */
962
	    *p++ = c;    /* accumulate name */
963
	}
963
	}
964
	*terminaltype = 0;
964
	*p = 0;
965
	terminaltype = terminalname;
966
	break;
965
	break;
967
    }  /* end of case TELOPT_TTYPE */
966
    }  /* end of case TELOPT_TTYPE */
968
967
(-)heimdal-0.6.4/appl/telnet/telnetd/telnetd.c (-2 / +2 lines)
Lines 636-642 getterminaltype(char *name, size_t name_ Link Here
636
		     */
636
		     */
637
		    _gettermname();
637
		    _gettermname();
638
		    if (strncmp(first, terminaltype, sizeof(first)) != 0)
638
		    if (strncmp(first, terminaltype, sizeof(first)) != 0)
639
			strcpy(terminaltype, first);
639
			strlcpy(terminaltype, first, sizeof(terminaltype));
640
		    break;
640
		    break;
641
		}
641
		}
642
	    }
642
	    }
Lines 752-758 Please contact your net administrator"); Link Here
752
     */
752
     */
753
    *user_name = 0;
753
    *user_name = 0;
754
    level = getterminaltype(user_name, sizeof(user_name));
754
    level = getterminaltype(user_name, sizeof(user_name));
755
    esetenv("TERM", terminaltype ? terminaltype : "network", 1);
755
    esetenv("TERM", terminaltype[0] ? terminaltype : "network", 1);
756
756
757
#ifdef _SC_CRAY_SECURE_SYS
757
#ifdef _SC_CRAY_SECURE_SYS
758
    if (secflag) {
758
    if (secflag) {

Return to bug 91593