apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [ADDON] apr_file_open_temp
Date Fri, 14 Sep 2001 16:46:35 GMT
Ryan Bloom <rbb@covalent.net> writes:

> File open shouldn't handle the temp file stuff.  That is overloading apr_file_open
> too much.  It already has too many different modes of operation.  We should
> have a separate API that creates a temp file.  That API should call apr_file_opn
> and apr_mkstemp under the covers.

not exactly... perhaps apr_file_open() and apr_file_create_temp()*
should call the common code under the covers for certain mundane

a concise set of code (e.g., apr_mkstemp()) needs to be in charge of
the filename generation and the open(), or security is hard to maintain

it should be simple for apr_file_open() on Unix to substitute the
open() call with an apr_mkstemp() call when appropriate, but a
separate API is fine... there will just be some shuffling around of
code from apr_file_open() to one or two utility routines called from
both apr_file_open() and apr_file_create_temp()*

*just a silly name I made up for the purposes of this post; not a real
 suggestion :)

Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message