<<< Date Index >>>     <<< Thread Index >>>

Re: mutt_adv_mktemp() ?



Hi,

* Kyle Wheeler [06-10-04 10:26:52 -0400] wrote:
1. For extensions, there is mkstemps(), though it is slightly less portable.

Now that I looked at the code: I remember I once tried replacing the mktemp() call and failed. Well, not really failed but mutt_adv_mktemp() returns void, i.e. a replacement using mkstemp()/mkstemps() requires either:

1) return the fd or a FILE* pointer and change all consumers

or

2) continue to return void and let the consumers open the file again

I think I took 1) since 2) isn't much better than now. And I think there're some non-trivial parts (crypto I think) which require some more reading and knowledge of what's going on in order to make 1) work smoothly.

So it's unfortunately not really done in a few minutes. If the current code is a problem (well, many application I've seen do it a lot worse than mutt :-), use ~/tmp with 0700 bits...

  bye, Rocco
--
:wq!