Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!decwrl!sgi!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: TMPDIR (was Re: Nasty Security Hole?) Keywords: mail permissions security Message-ID: <755@quintus.UUCP> Date: 27 Nov 88 07:06:56 GMT References: <175@ernie.NECAM.COM> <189@wyn386.UUCP> <2955@ingr.UUCP> <1031@alobar.ATT.COM> <6527@june.cs.washington.edu> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Distribution: na Organization: Quintus Computer Systems, Inc. Lines: 13 In article <6527@june.cs.washington.edu> ka@june.cs.washington.edu (Kenneth Almquist) writes: >It would certainly possible for AT&T to give each user his or her own >temporary directory and to modify the standard System V programs to use >this directory. See TEMPNAM(BA_LIB) in the SVID. char *tempnam(char *dir, char *prefix) If TMPDIR is defined in the user's environment and can be used, use that. If dir is non-NULL and names a usable directory, use that. If P_tmpdir (in , usually /usr/tmp/) is usable, use that. Use /tmp only as a last resort. (Yes, that's right, $TMPDIR over-rides the dir argument.)