Date: Sun, 28 Oct 2001 18:52:06 -0500 (EST) From: sit@mit.edu To: FreeBSD-gnats-submit@freebsd.org Subject: ports/31567: tgif -print fails to create temp files Message-ID: <200110282352.f9SNq6n94385@finite-subcover.lcs.mit.edu>
next in thread | raw e-mail | index | archive | help
>Number: 31567 >Category: ports >Synopsis: tgif -print fails to create temp files >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 28 16:00:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Emil Sit >Release: FreeBSD 4.3-RELEASE i386 >Organization: MIT >Environment: System: FreeBSD finite-subcover.lcs.mit.edu 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Wed Sep 19 17:08:16 EDT 2001 root@cleisthenes.lcs.mit.edu:/disk/cl0/src/sys/compile/PDOS-UNI-SND i386 >Description: When tgif -print is invoked, it tries to create a temporary file. The port, as compiled, will fail here. The makefile appears to not favor using mktemp (or mkstemp, etc) by defining _DONT_USE_MKTEMP in Tgif.tmpl. This appears to have been introduced in 4.1.35 upstream, as evidenced by: http://bourbon.cs.umd.edu:8001/tgif/relnotes/v4.1.35.html which says: Support the use of tempnam() instead of mktemp() due to some security considerations. On systems that do support tempnam(), the _DONT_USE_MKTEMP compiler option can be used to use tempnam() instead of mktemp(). Tgif.tmpl-linux (which is identical to the default Tgif.tmpl), Tgif.tmpl-freebsd, Tgif.tmpl-openbsd, and Tgif.tmpl-netbsd uses -D_DONT_USE_MKTEMP by default. Thanks to Adrian Bridgett <adrian.bridgett@iname.com> for pointing out the problem. exec.c would seem to indicate that there's someplace where ExecMktemp is called with a relative path and so tempnam is assuming /. It's not quite clear to me where this is happening. >How-To-Repeat: $ tgif test.obj # Create and save this file $ tgif -print -eps test.obj Tgif Version 4.1 (patchlevel 40) Copyright (C) 1990-2000, William Chia-Wei Cheng Reading 'test.obj'... Race condition detected in creating the '/TgifOzZSmv' temporary file. Possible causes are network problems, security problems, etc. This file will be removed before proceeding. Cannot open '/TgifOzZSmv' for writing. Printing aborted. >Fix: A temporary workaround is simply: $ TMPDIR=/tmp tgif -print -eps test.obj This is obviously limited to runtime. Another possibility might be to simply not define _DONT_USE_MKTEMP; patch-ab already mucks around with Tgif.tmpl Or this might be an upstream bug and should be fixed by the maintainer. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110282352.f9SNq6n94385>