Avoiding tempnam (in favor of mkstemp)

Marcus Meissner marcus at jet.franken.de
Sun Feb 2 23:57:38 CST 2003


On Sun, Feb 02, 2003 at 06:12:06PM -0500, Dimitrie O. Paun wrote:
> On February 1, 2003 03:31 am, Gerald Pfeifer wrote:
> > We have had some (security-relevant) warning regressions for the following
> > two programs in tools:
> 
> There's no regression -- these utilities have been using tempnam() from 
> their very beginnings... :)
> 
> > Would you mind using mkstemp() instead of tempnam()?
> 
> I'm afraid that's not possible. I need a file name to pass to other
> processes, not a file descriptor.  Any other suggestions?

mkstemp returns both filename and descriptor, it modifies
the passed argument array. There is just the caveat that it needs
the filename to end with XXXXXX.

Ciao, Marcus



More information about the wine-devel mailing list