<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://tcl.activestate.com/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Thu Feb 09 11:02:04 GMT 2012 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='61'>
<header><title>Make TK_NO_SECURITY Run-Time Switchable</title><author address="mailto:JeffH@ActiveState.com">Jeff Hobbs</author><author address="mailto:fellowsd@cs.man.ac.uk">Donal K. Fellows</author><status type='project' state='deferred' tclversion="8.5" vote='prior'>$Revision: 1.4 $</status><history></history><created day='12' month='sep' year='2001' /></header>
<abstract>This TIP changes the compile time Tk define TK_NO_SECURITY to be switchable at run-time.</abstract>
<body><section title="Rationale">
<para>The TK_NO_SECURITY compile time #define is available to disable some security checking when send is used. The direct comments in the Makefile are:</para>
<verbatim><vline encoding='base64'>ICMgVG8gdHVybiBvZmYgdGhlIHNlY3VyaXR5IGNoZWNrcyB0aGF0IGRpc2FsbG93IGluY29taW5nIHNlbmRzIHdoZW4=</vline><vline encoding='base64'>ICMgdGhlIFggc2VydmVyIGFwcGVhcnMgdG8gYmUgaW5zZWN1cmUsIHJldmVyc2UgdGhlIGNvbW1lbnRzIG9uIHRoZQ==</vline><vline encoding='base64'>ICMgZm9sbG93aW5nIGxpbmVzOg==</vline><vline encoding='base64'>IFNFQ1VSSVRZX0ZMQUdTCQk9</vline><vline encoding='base64'>ICNTRUNVUklUWV9GTEFHUwkJPSAtRFRLX05PX1NFQ1VSSVRZ</vline></verbatim>
<para>I propose to make this switch configurable at runtime through a <emph style="italic">tk securesend</emph> option.</para>
</section>
<section title="Benefits">
<para>Users would be able to debug between Tk applications on Unix using <emph style="italic">send</emph> without having to compile a special version of Tk or manipulating the security settings of their X server to Tk&apos;s liking (which can then conflict with other work). It is common for users in internal (&quot;safe&quot;) networks to open up access to an X server with <emph style="italic">xhost +machine</emph>.</para>
</section>
<section title="Drawbacks">
<para>By allowing security to be disabled, users do possibly open up their system to attack. However, secure is the default setting, and any paranoid users can <emph style="italic">rename send {}</emph> to ensure that it is not used at all.</para>
</section>
<section title="Reference Implementation">
<para>A full patch for this feature is available at:</para>
<para><url ref="http://sf.net/tracker/?func=detail&amp;aid=456732&amp;group_id=12997&amp;atid=312997"/></para>
<para>The proposal adds one element to the private <emph style="italic">TkDisplay</emph> structure (configuration for secure send is done per display), and creates the Tcl level command:</para>
<verbatim><vline encoding='base64'>CXRrIHNlY3VyZXNlbmQgPy1kaXNwbGF5b2Ygd2luZG93PyA/Ym9vbGVhbj8=</vline></verbatim>
<para>It leaves the TK_NO_SECURITY flag alone. If specified, send is insecure by default, otherwise it is secure.</para>
</section>
<section title="Comments">
<para><emph style="italic">DKF</emph> - It should be possible to control the setting of the compile-time TK_NO_SECURITY flag from the <emph style="italic">configure</emph> script; having to edit the Makefile by hand to adjust it makes it too easy to inadvertently break something by introducing an unfortunate typo. Being able to pass a <emph style="italic">--disable-security</emph> flag would make thing much easier from a user&apos;s point of view, and will make it less likely that the Tk maintainers will have to deal with bug reports that ultimately stem from a dumb mistake made in a sensitive spot...</para>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>

