Re: Creating temporary files?
Re: Creating temporary files?
- Subject: Re: Creating temporary files?
- From: Chris Ridd <email@hidden>
- Date: Mon, 24 Jun 2002 10:48:07 +0100
On 22/6/02 6:39 pm, Paul Chakravarti (pc000) <email@hidden>
wrote:
>
On Saturday, June 22, 2002, at 12:35 PM, Per Persson wrote:
>
>
>>> On Friday, June 21, 2002, at 01:39 PM, Dinu Gherman wrote:
>
>>>
>
>>> Isn't there some standard way to create a temp file
>
>>
>
>> Check out the C functions tmpfile() and tmpnam().
>
>>
>
>> sherm--
>
>
>
>
You need to be careful with race conditions when creating temp
>
files - the mkstemp(3) interface (which atomically creates and
>
returns fhe file descriptor of the tmp file) is the preferred
>
mechanism rather than tmpfile/tmpname (which are largely
>
deprecated).
>
>
PaulC
This is good advice. For details read the "Insecure Use of Temporary Files"
section of:
<
http://www.securityfocus.com/popups/forums/secprog/secure-programming.shtml
>
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.