Skip Menu |
 

Download (untitled) / with headers
text/plain 3.3KiB
From tlyu@MIT.EDU Thu Oct 10 12:56:24 1996
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id MAA28971 for <bugs@RT-11.MIT.EDU>; Thu, 10 Oct 1996 12:56:24 -0400
Received: from TESLA-COIL.MIT.EDU by MIT.EDU with SMTP
id AA25033; Thu, 10 Oct 96 12:56:23 EDT
Received: by tesla-coil.MIT.EDU (5.x/4.7) id AA12295; Thu, 10 Oct 1996 12:56:21 -0400
Message-Id: <199609172110.RAA25408@jik.tiac.net>
Date: Tue, 17 Sep 1996 17:10:07 -0400
From: "Jonathan I. Kamens" <jik@jik.tiac.net>
To: krb5-bugs@MIT.EDU, kerberos@MIT.EDU
Subject: krb5b7: Don't process XDISPLOC if DISPLAY is unexported

Show quoted text
>Number: 96
>Category: telnet
>Synopsis: krb5b7: Don't process XDISPLOC if DISPLAY is unexported
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Thu Oct e 12:57:03 EDT 1996
>Last-Modified: Fri Oct e 20:00:15 EDT 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: tlyu
Responsible-Changed-When: Thu Oct 10 13:04:15 1996
Responsible-Changed-Why:
refiled

State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Fri Oct 11 20:00:00 1996
State-Changed-Why:
Integrated.


Show quoted text
>Unformatted:
The patch below prevents the XDISPLOC option from being processed if
the DISPLAY environment variable is unexported by the user. In other
words, it makes it possible for the user to prevent the DISPLAY
environment variable from being sent to the remote host by unexporting
it.

--- telnet/commands.c 1996/09/17 19:55:36 1.3
+++ telnet/commands.c 1996/09/17 19:56:23 1.4
@@ -1872,6 +1872,17 @@
return(NULL);
}

+ int
+env_is_exported(var)
+ unsigned char *var;
+{
+ register struct env_lst *ep;
+
+ if ((ep = env_find(var)))
+ return ep->export;
+ return 0;
+}
+
#if defined(OLD_ENVIRON) && defined(ENV_HACK)
void
env_varval(what)
--- telnet/externs.h 1996/09/17 20:00:35 1.2
+++ telnet/externs.h 1996/09/17 20:01:08 1.3
@@ -324,6 +324,9 @@
*env_getvalue P((unsigned char *));

extern int
+ env_is_exported P((unsigned char *));
+
+extern int
get_status P((void)),
dosynch P((void));

--- telnet/telnet.c 1996/09/17 20:05:03 1.1
+++ telnet/telnet.c 1996/09/17 20:05:19 1.2
@@ -521,7 +521,8 @@
#endif

case TELOPT_XDISPLOC: /* X Display location */
- if (env_getvalue((unsigned char *)"DISPLAY"))
+ if (env_getvalue((unsigned char *)"DISPLAY") &&
+ env_is_exported((unsigned char *)"DISPLAY"))
new_state_ok = 1;
break;

@@ -954,7 +955,8 @@
unsigned char temp[50], *dp;
int len;

- if ((dp = env_getvalue((unsigned char *)"DISPLAY")) == NULL) {
+ if (((dp = env_getvalue((unsigned char *)"DISPLAY")) == NULL) ||
+ (! env_is_exported((unsigned char *)"DISPLAY"))) {
/*
* Something happened, we no longer have a DISPLAY
* variable. So, turn off the option.
@@ -2286,7 +2288,8 @@
send_will(TELOPT_LINEMODE, 1);
send_will(TELOPT_NEW_ENVIRON, 1);
send_do(TELOPT_STATUS, 1);
- if (env_getvalue((unsigned char *)"DISPLAY"))
+ if (env_getvalue((unsigned char *)"DISPLAY") &&
+ env_is_exported((unsigned char *)"DISPLAY"))
send_will(TELOPT_XDISPLOC, 1);
if (eight)
tel_enter_binary(eight);