Subject: bin/7796: pax does not respect TMPDIR
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/16/1999 17:22:05
>Number:         7796
>Category:       bin
>Synopsis:       pax does not respect TMPDIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 16 17:20:01 1999
>Originator:     Chris Demetriou
>Release:        1.4
unnecesary.  look in the 1.4 sources and the -current
sources as of the date this PR was filed.
pax does not respect TMPDIR.  environ(7) says:

     TMPDIR     The directory in which to store temporary files.  Most appli-
                cations use either /tmp or /var/tmp.  Setting this variable
                will make them use another directory.

However, pax ignores the setting of TMPDIR and throws its temporary
files into /tmp.  This means that if, for whatever reason (e.g.
no inodes left in /, as seems to be the case in the arm32 1.4
distribution disk image!) you can't write to /tmp, you can't use pax
to extract files.
arrange for /tmp to be unwritable, try to extract files with

alternately, look at the pax source.
make pax respect TMPDIR.  (while at it, probably a good
idea to make it not hard-code the /tmp path name, and use
_PATH_TMP instead.)

A good example of a reasonable way to do this is in the
ftp sources.