GNU GCC's f77 [tempnam -> mkstemp; proposed patch]
Zack Weinberg
zackw@Stanford.EDU
Tue Nov 14 23:13:00 GMT 2000
On Tue, Nov 14, 2000 at 02:52:06PM -0800, Richard Henderson wrote:
> On Tue, Nov 14, 2000 at 10:42:57PM +0100, Toon Moene wrote:
> > If noone shoots a hole in this update before tomorrow 18 UTC, I'll apply
> > the patch:
>
> Well, I don't see anything wrong with the patch itself. But
> looking at the surrounding code I'd say it's pointless. If
> you go and close the file immediately, and re-open it by name
> you've just obviated all the benefit of using mkstemp.
But mkstemp has created the file, so unless you unlink it, you own
that name. Right? Absent a malicious root or bad permissions on
/tmp... okay, it's not ideal.
> Really, that code is so ugly as to be practially unsalvagable.
No argument from me here.
zw
More information about the Gcc-patches
mailing list