On 5/1/07, stephen joseph butler <email@hidden> wrote:
On 5/1/07, Jaime Magiera <email@hidden> wrote:
> However, there is a security issue, in the eyes of some, that writing
> to /tmp is bad. So, they have it cordoned off on their systems.
> Another issue would be if a user was rendering content that they
> didn't want other users (such as those logged via SSH) to see.
>
> What are the options/suggestions for tmp file writing that is secure
> but also follows Apple's guidelines? What are other folks doing?
As far as I know, mkstemp() is what you're supposed to use (man 3
mkstemp). You can take the returned FD and wrap it in an NSFileHandle
for convenience.
Actually, here's a quick category that should work (untested):