5 ms·
Why is /tmp not suitable for IPC? Is it because it's generally more open than a home directory?
by sa46 8y ago
Why is /tmp not suitable for IPC? Is it because it's generally more open than a home directory?
- harrygeez 8y agoProbably because everyone can access your clipboard
- cxseven 8y agoSomeone could put a symlink at that location to direct the output to clobber or create a file under your control.
- stevekemp 8y agoFirst 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