Tcl Source Code

Check-in [28d5aafdfa]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:* generic/tclInterp.c (Tcl_MakeSafe): Remove tcl_platform(user) from safe interps.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-1-branch-old
Files: files | file ages | folders
SHA1: 28d5aafdfae231518165319921d93ba3c8d79b50
User & Date: stanton 1999-03-14 18:56:20
Context
1999-03-14
18:56
*** empty log message *** check-in: 086845e082 user: stanton tags: core-8-1-branch-old
18:56
* generic/tclInterp.c (Tcl_MakeSafe): Remove tcl_platform(user) from safe interps. check-in: 28d5aafdfa user: stanton tags: core-8-1-branch-old
18:56
* generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclIntPlatStubs.c: * generic/tclIntS... check-in: 4487d5ada8 user: stanton tags: core-8-1-branch-old
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclInterp.c.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
....
2312
2313
2314
2315
2316
2317
2318

2319
2320
2321
2322
2323
2324
2325
 *	and manipulation of Tcl interpreters from within Tcl scripts.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclInterp.c,v 1.1.2.9 1999/03/10 06:49:19 stanton Exp $
 */

#include <stdio.h>
#include "tclInt.h"
#include "tclPort.h"
 
/*
................................................................................
    /* 
     * Remove unsafe parts of tcl_platform
     */

    Tcl_UnsetVar2(interp, "tcl_platform", "os", TCL_GLOBAL_ONLY);
    Tcl_UnsetVar2(interp, "tcl_platform", "osVersion", TCL_GLOBAL_ONLY);
    Tcl_UnsetVar2(interp, "tcl_platform", "machine", TCL_GLOBAL_ONLY);


    /*
     * Unset path informations variables
     * (the only one remaining is [info nameofexecutable])
     */

    Tcl_UnsetVar(interp, "tclDefaultLibrary", TCL_GLOBAL_ONLY);






|







 







>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
....
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
 *	and manipulation of Tcl interpreters from within Tcl scripts.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclInterp.c,v 1.1.2.10 1999/03/14 18:56:20 stanton Exp $
 */

#include <stdio.h>
#include "tclInt.h"
#include "tclPort.h"
 
/*
................................................................................
    /* 
     * Remove unsafe parts of tcl_platform
     */

    Tcl_UnsetVar2(interp, "tcl_platform", "os", TCL_GLOBAL_ONLY);
    Tcl_UnsetVar2(interp, "tcl_platform", "osVersion", TCL_GLOBAL_ONLY);
    Tcl_UnsetVar2(interp, "tcl_platform", "machine", TCL_GLOBAL_ONLY);
    Tcl_UnsetVar2(interp, "tcl_platform", "user", TCL_GLOBAL_ONLY);

    /*
     * Unset path informations variables
     * (the only one remaining is [info nameofexecutable])
     */

    Tcl_UnsetVar(interp, "tclDefaultLibrary", TCL_GLOBAL_ONLY);