Re: [AD] dat/grabber and pack_fopen_chunk

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday, January 22, 2006, at 02:23  pm, Evert Glebbeek wrote:

The problem is that it does not seem to specify the directory that it will
be placed in, returning EACCES if the directory it tries to use is not
writable.
I read it as meaning that, although the _standard_ does not say where it should go, the directory chosen will be a suitable one (it may just be /tmp, I just tried in on the Mac and it was /var/tmp)

 These guys never try to do things the
easy way, do they?
Weird how you can pass it an integer to ensure that you _don't_ get a random filename.

The creation of temporary files seems to have three parts. (i) to find a suitable location (ii) make a 'random', unique filename... (iii)... and open it atomically. I don't exactly understand but there seems to be a security risk if another process can jump in and access the temporary file, after you've decided its name, but before you've opened it.

Pete






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/