NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/55815: tar opens device files

If we’re talking about “ensure the file we’re opening is a regular file”, won’t O_REGULAR do that you want?

Yes, but that suffers from TOCTOA too:

if (open(path, O_REGULAR) == -1)
fstat(path, &st);

But that's probably good enough.


Attachment: signature.asc
Description: Message signed with OpenPGP

Home | Main Index | Thread Index | Old Index