From owner-freebsd-ports Sun Oct 28 16: 0: 7 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6FCA137B405 for ; Sun, 28 Oct 2001 16:00:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9T001j21097; Sun, 28 Oct 2001 16:00:01 -0800 (PST) (envelope-from gnats) Received: from finite-subcover.lcs.mit.edu (24-6-214.wireless.lcs.mit.edu [18.24.6.214]) by hub.freebsd.org (Postfix) with ESMTP id B633E37B405 for ; Sun, 28 Oct 2001 15:52:07 -0800 (PST) Received: (from sit@localhost) by finite-subcover.lcs.mit.edu (8.11.3/8.11.3) id f9SNq6n94385; Sun, 28 Oct 2001 18:52:06 -0500 (EST) (envelope-from sit) Message-Id: <200110282352.f9SNq6n94385@finite-subcover.lcs.mit.edu> Date: Sun, 28 Oct 2001 18:52:06 -0500 (EST) From: sit@mit.edu Reply-To: sit@mit.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/31567: tgif -print fails to create temp files Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 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