summaryrefslogtreecommitdiff
path: root/lib/fts.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-10-05 21:38:10 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-10-05 21:38:10 +0000
commit2e749d9876b6c6cbc098dff94b94d4df3981cbb0 (patch)
treea8fcfc4ad3d60f71e8bc6620480f19461614851e /lib/fts.c
parent29f6a5bdd6f64e45ebd5eae004881b8d70c3c459 (diff)
downloadgnulib-2e749d9876b6c6cbc098dff94b94d4df3981cbb0.tar.gz
[lib/ChangeLog]
* fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE; we now test for that separately. * fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW rather than O_NOFOLLOW, when testing whether it's possible to avoid a race condition reliably. * savewd.c (savewd_chdir): Likewise. [m4/ChangeLog] * fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead of O_NOFOLLOW_IS_INEFFECTIVE. Define HAVE_WORKING_O_NOATIME if O_NOATIME works.
Diffstat (limited to 'lib/fts.c')
-rw-r--r--lib/fts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fts.c b/lib/fts.c
index 879da65221..07fe170f2e 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1421,7 +1421,7 @@ fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir)
general (when the target is not ".."), diropen's use of
O_NOFOLLOW ensures we don't mistakenly follow a symlink,
so we can avoid the expense of this fstat. */
- if (ISSET(FTS_LOGICAL) || O_NOFOLLOW == 0
+ if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW
|| (dir && STREQ (dir, "..")))
{
struct stat sb;