On Mon, 26 Mar 2007, Ron Johnson wrote: > > And it is *excellent* design to unlink an open file depending on what you > > want it for. It is the only failure-proof way to make sure temporary files > > cannot be attacked from outside, and also that they will disappear if the > > program crashes, exits, or has other problems. You can easily change that > > to a "unlink on sucessfull exit" thing when running in debug mode, too. > > It's excellent only if your filesystem does not have rich-enough > semantics to protect your files from outside snoops.
Sorry, but no. It is excellent because you never have to clean up after screw ups (the file will be gone as soon as it is closed or the process is terminated), and because it makes it impossible for incompetent programmers to access a file by anything other than its fd after it was created + unlinked. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]