diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-10-05 21:38:10 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-10-05 21:38:10 +0000 |
commit | 2e749d9876b6c6cbc098dff94b94d4df3981cbb0 (patch) | |
tree | a8fcfc4ad3d60f71e8bc6620480f19461614851e /lib/fts.c | |
parent | 29f6a5bdd6f64e45ebd5eae004881b8d70c3c459 (diff) | |
download | gnulib-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |