Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 37090 invoked by uid 500); 5 Dec 2002 20:33:27 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 37079 invoked from network); 5 Dec 2002 20:33:26 -0000 Message-Id: <5.1.0.14.2.20021205143109.02c39cf0@pop3.rowe-clan.net> X-Sender: admin%rowe-clan.net@pop3.rowe-clan.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 05 Dec 2002 14:33:12 -0600 To: Aaron Bannert From: "William A. Rowe, Jr." Subject: Re: APR_TMP_DIRECTORY Cc: dev@apr.apache.org In-Reply-To: <754CD72A-0884-11D7-9902-000393B3C494@clove.org> References: <5.1.0.14.2.20021205123906.03e3da00@pop3.rowe-clan.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 05 Dec 2002 20:33:20.0078 (UTC) FILETIME=[8C7FCEE0:01C29C9D] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N At 01:05 PM 12/5/2002, Aaron Bannert wrote: >On Thursday, December 5, 2002, at 10:43 AM, William A. Rowe, Jr. wrote: >>As a developer/administrator/user, I *really* get ticked off by those >>developers who don't respect my system-wide %TEMP%/%TMP% >>assignments. This isn't just a personal choice, since on locked down >>boxes or with apps installed on network filesystems, the cwd() is the >>very *worst* place to put tempfiles. > >This is precisely why the app needs to let the admin chose where to >put temp files. > >>That said, we also shouldn't force developers to give any thought to >>these things. If the proposed solution walks down the chain until we >>find the most appropriate directory with create/write/rm access, then >>that code needs not be duplicated by every app. >> >>Yes, envvars are good (as long as they correspond to each platform's >>well-known envvar names.) Let's not make apr counterintuitive for the >>real users/administrators. > >Personally, I really get ticked off when programs go off and do >weird things based on lame environment variables that I didn't >explicitly set. We want to simplify and unify the interface >to our programs, not cause unintended side-effects (or even >worse, open up conduits for other holes to exploit). > >I don't care if there's a default as long as it comes from the app. >If the app wants to default to %TEMP% or $TMP or whatever, that's >fine, let them shoot themselves in the foot, but don't hand them >the gun. Ok... here's how I see us finding common ground... Add an apr_filepath_temp_set() that allows the developer to override the temp path for an entire app; e.g. those apps which have a config directive SetTempPath /zzz can support their temp path config flag. Unless apr_filepath_temp_set() was invoked, all temp-dir related directives will use the "native" choice. Bill