The strategy for preventing this type of problem on systems that lack
support for the O_NOFOLLOW flag is more complex. Each time
find
changes directory, it examines the directory it is about
to move to, issues the chdir()
system call, and then checks
that it has ended up in the subdirectory it expected. If not, an
error message is issued and find
exits immediately. This
method also prevents filesystem manipulation attacks from persuading
find
to search parts of the filesystem it did not intend.
However, we heve to take special steps in order not to be
unneccessarily concluding that there is a problem aut “automount”
mount points.