This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libstdc++, testsuite] Modify tests to use tmpnam()


Hi,
> I am not sure what kind of comment you want. Maybe something like:
> // Use tmpnam to create a unique name for the FIFO.
>   
I had in mind some kind of reminder, like a fixme to use it in more
places, consistently, but...
> Hm, I just happened to look at the linux man page for tmpnam (as opposed
> to the HPUX one) and noticed this:
>
> | BUGS
> |       Never use this function.  Use mkstemp(3) or tmpfile(3) instead.
>
> But I don't think either of those routines can create a FIFO like we are
> doing in these tests so this seems like a bogus comment in the man page.
>   
... I don' think it's bugus. I googled a bit and it seems a security
hazard. I'm a bit worried, even if probably it doesn't matter much for a
test. As I said above, we are looking for something solid, to be used
also elsewhere in the testsuite, in the future.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]