On 14. Nov, 2009, at 11:44 , Eric Noulard wrote:
2009/11/14 Michael Wild <them...@gmail.com>:
Just using /tmp isn't such a good idea (because of predictability and
symlink attacks). Which is why on APPLE TMPDIR looks like for, but
this
changes with each session.
/var/folders/Z9/Z9lmRtS+E1CUYo8TIW8r8E+++TM/-Tmp-
I didn't know that property of "session-uniqueness" but that's
pretty good.
There is no such mechanism I am aware of on Linux
Probably you CAN use /tmp if on UNIX and TMPDIR is not set, but
then you
should create a sub-directory with STRING(RANDOM ...)
Yes I agree my primary reason for doing that (create a subdir)
wasn't security but uniqueness, now I think one should require both
by crafting a tmpdir from STRING(RANDOM ...)
AND
some USER specific data as a prefix or suffix like ENV(USER) or ENV
(USERNAME).
Hmm, not sure anymore its unique to the session. Just tried logging in
and out several times with different users, and it seems that I always
get the same temporary directory for a each user. Not sure what
happens on reboot.
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake