Dave Kinchlea <kinch(_at_)kcc(_dot_)empath(_dot_)on(_dot_)ca> wrote:
On Mon, 1 Jul 1996, Doug Hughes wrote:
I never meant to imply that find itself will cause problems, but using
find to remove files from cron is dangerous.
But only under very specific circumstances. The recent noise about it
was about the use of:
find /tmp ... -exec rm {} \;
and the race condition exists becaues /tmp is generally mode 1777
allowing anybody to write in the directory. Knowing the algorithm of
find, it is possible to fool find into providing a path to the rm
command that is, in fact, not pointing to the file that find thinks it
is (find is conjoled into following symbolic links even though it
shouldn't).
Please enlighten me (though we are getting off-topic); isn't this
really a problem with either having "." in root's path, or not having
the cron job run:
find /tmp ... -exec /bin/rm {} \;
?
Thanks,
Stan. (stanr(_at_)tiac(_dot_)net)