summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2008-12-06 20:12:25 (GMT)
committerdkf <dkf@noemail.net>2008-12-06 20:12:25 (GMT)
commitceda1d42c0c42611011ecf90b6b45f1d5debfcef (patch)
tree86436a4236eb2c0ce02386fd184c4eee48cb6b47 /generic/tclCmdAH.c
parent3250e3b7ae310e2e95b9d558262d716cdb9574f4 (diff)
downloadtcl-ceda1d42c0c42611011ecf90b6b45f1d5debfcef.zip
tcl-ceda1d42c0c42611011ecf90b6b45f1d5debfcef.tar.gz
tcl-ceda1d42c0c42611011ecf90b6b45f1d5debfcef.tar.bz2
Partial fix for [Bug 2388866]
FossilOrigin-Name: 5977c472398a6d71eb17e3274e0e308814917b07
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index ead9384..bc02f16 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.111 2008/12/02 19:40:41 dgp Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.112 2008/12/06 20:12:27 dkf Exp $
*/
#include "tclInt.h"
@@ -1704,6 +1704,18 @@ FileTempfileCmd(
|| (tclPlatform == TCL_PLATFORM_WINDOWS
&& strchr(string, '\\') != NULL)) {
tempDirObj = TclPathPart(interp, objv[3], TCL_PATH_DIRNAME);
+
+ /*
+ * Only allow creation of temporary files in the native filesystem
+ * since they are frequently used for integration with external
+ * tools or system libraries. [Bug 2388866]
+ */
+
+ if (Tcl_FSGetFileSystemForPath(tempDirObj)
+ != &tclNativeFilesystem) {
+ TclDecrRefCount(tempDirObj);
+ tempDirObj = NULL;
+ }
}
/*