[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#253094: teTeX's scripts use hardcoded paths for tempfiles



Frank Küster writes:

> The problem with this is that under some circumstances a local admin
> might want to change the temporary directory. This can usually be done
> by setting the TMPDIR variable. Some of your scripts respect it,
> e.g. from texconfig:

> tmpdir=${TMPDIR-/tmp}/texconf$$

> But others don't. I got, from 
> dlocate -L tetex-bin|xargs egrep '/tmp|TMPDIR=' 2>/dev/null | grep -v ^Binary

> texmf.cnf          : % TEXMFOUTPUT = /tmp (don't know whether this can be
>                                      changed, and it's commented)
> /usr/bin/allcm     : cd /tmp
> /usr/bin/allec     : cd /tmp

These are the same script, which definitely suffers from the problem.

> /usr/bin/dvipdft   : TMP=/tmp/dvipdft.$$

Fixed in the TeX-live sources, at least.

> /usr/bin/rubibtex  : TEMP=/tmp

Has problem.

> /usr/bin/t1mapper  : $logname="/tmp/$logname";

Perl script, has problem.

> /usr/bin/texdoctk  : my $TempDir = "/tmp"; (this might be a false positive)

Perl script, I believe it has the problem.

> /var/lib/texmf/web2c/mktex.opt:  TEMPDIR="/tmp/mt$$.tmp" 
>                          (sourced by lots of scripts!)

mktex.opt is a false positive.  The full sequence of commands is given
below:

if test -n "$TMPDIR"; then
  TEMPDIR="${TMPDIR}/mt$$.tmp"
else
  TEMPDIR="/tmp/mt$$.tmp"
fi

> xdvizilla has been fixed from 2.0.2 to the current beta.

> Thomas, are you aware of this? For which of those scripts do you feel
> responsible, for which should we contact upstream directly?

-- 
Olaf Weber

               (This space left blank for technical reasons.)




Reply to: