I opted for a more conservative approach by applying this additional patch also:

2007-12-04  James Youngman  <[EMAIL PROTECTED]>

        * find/find.c (safely_chdir): When O_NOFOLLOW is available, fall
        through to using safely_chdir_lstat only when
        safely_chdir_nofollow returns SafeChdirFailDestUnreadable.
---
 find/find.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/find/find.c b/find/find.c
index 6a3976a..1688cf7 100644
--- a/find/find.c
+++ b/find/find.c
@@ -882,8 +882,18 @@ safely_chdir(const char *dest,
     {
       result = safely_chdir_nofollow(dest, direction, statbuf_dest,
                                     symlink_follow_option, did_stat);
-      if (SafeChdirOK == result)
-       return result;
+      if (SafeChdirFailDestUnreadable != result)
+       {
+         return result;
+       }
+      else
+       {
+         /* Savannah bug #15384: fall through to use safely_chdir_lstat
+          * if the directory is not readable.
+          */
+         /* Do nothing. */
+       }
+
     }
   /* Even if O_NOFOLLOW is available, we may need to use the alternative
    * method, since parent of the start point may be executable but not
-- 
1.5.3.6


_______________________________________________
Findutils-patches mailing list
Findutils-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/findutils-patches

Reply via email to