fts: use O_NOFOLLOW to avoid race condition when opening a directory
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2010 19:38:41 +0000 (12:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2010 19:39:10 +0000 (12:39 -0700)
commit0971365ee6f6638cbeec77db08fbdfe5f3bab53d
tree615502b57234ee5b83790930b213cc80186d99ed
parent970c9038e4cca46e1b037ae0a6d574dfae6a7327
fts: use O_NOFOLLOW to avoid race condition when opening a directory

* lib/fts.c (opendirat): New arg extra_flags.
(__opendir2): Use it to avoid following symlinks when opening
a directory, if symlinks are not supposed to be followed.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00213.html>.
ChangeLog
lib/fts.c