What the hell is going on with TMPDIR ????

aka /var/folders/


Yup, it is another of the "magic" tricks NEW to Leopard client and server.
TMPDIR (/var/folders) is generated randomly in LEOpard, ONLY when a user does a GUI login !!!

Wanna see a TON-O-CRAP ? do,
sudo du -sh /var/folders/
# ################## #
...the decisions which led to this (change) revolved around security.

 There were a number of attacks which used prior knowledge of another processes' temporary directory
 location to race it to the creation of temporary files.
 
 I think the benefits of "randomizing" it and putting it under the control of launchd far outweigh any
 legitimate uses of it (and processes which need to share files across user
 instances ought to create specialized subdirectories of /tmp for this purpose anyway)...
# ################## #

Wanna see how much crap just Safari has stored ?

du -ch {~/Library/Caches/,`/usr/bin/getconf DARWIN_USER_CACHE_DIR`}com.apple.Safari
or
/usr/bin/getconf DARWIN_USER_TEMP_DIR
and
/usr/bin/getconf DARWIN_USER_CACHE_DIR

Wanna CLEAN them ?

rm -rf `/usr/bin/getconf DARWIN_USER_CACHE_DIR`
and
rm -rf `/usr/bin/getconf DARWIN_USER_TEMP_DIR`

Cool eh ?

Maybe we can find an application like LCC to do this for us ???
See also:
http://www.macosxhints.com/article.php?story=20090625155239817
back

© Gary Sullivan Maintainer of this page.
The URL of this page is:
http://www.hackerskitchen.com/mac-old/tempdir.html
Constructive Comments, Suggestions and Requests are welcome.

Hello

Go Home