Thread-topic: Function to generate a temporary filename
User-agent: Microsoft-Entourage/11.2.0.050811
> The atomicity needs to occur at the
> generate unique temp filename
> create the file
> open the file
>
> FSCreateFileAndOpenForkUnicode doesn't addess steps 1 and 2. I
> believe it is atomic w.r.t steps 2 and 3.
Why would you require atomicity with 1 & 2? Until the file is created, there
is no opportunity for an attacker to try to snag it and fill it in. Yes,
another process could inadvertently create a file with the same name, but
that's easy enough to handle by checking error return and retrying.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 665-7007 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden