3 ms·
First of all because anybody can read the contents of files there - presuming you don't have a sane umask. Secondly because other uesrs might create files. Im
by stevekemp 9y ago
First of all because anybody can read the contents of files there - presuming you don't have a sane umask.
Secondly because other uesrs might create files. Imagine somebody ran:
ln -s /home/foo/.bash_profile /tmp/clipboard-data.txt
The next time you ran your clipboard-script your .bash_profile file would get its contents erased, due to the symlink.
Predictable filenames are a big security hole for multiuser systems, even though in practice you're probably the sole user of your desktop/laptop. I've reported numerous bugs of this kind, including this small set against GNU emacs:
http://seclists.org/oss-sec/2014/q2/269 http://seclists.org/oss-sec/2014/q2/269