A better solution would be if applications always opened files in /tmp
with O_CREAT | O_EXCL. tmpfile(3) does this but the file is always
644. I think there should be a tmpfilem(mode_t) where the mode could
be specified.
I was forced to implement my own tmpfile(3) from tmpnam(3) to fix
similiar
There are some nasty attacks with links and symlinks in temp directories
(see bugtraq for an extended list). Some programs solve this by
putting temp files in home directories. This is clearly suboptimal
(networked home directory, quotas, ...). /tmp and /var/tmp are there
for a good reason.
One
2 matches
Mail list logo