]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(ftw_startup): Check, if the path is search and readable.
authorUlrich Drepper <drepper@redhat.com>
Mon, 10 Dec 2001 23:51:23 +0000 (23:51 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 10 Dec 2001 23:51:23 +0000 (23:51 +0000)
io/ftw.c

index 862774c9721bca5d4da344ad8c3757f8c2288956..cbd6be707e270e2a50f2a355b4f6b62575a8cc17 100644 (file)
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -473,6 +473,9 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
       return -1;
     }
 
+  if (__access (dir, R_OK) != 0)
+    return -1;
+
   data.maxdir = descriptors < 1 ? 1 : descriptors;
   data.actdir = 0;
   data.dirstreams = (struct dir_data **) alloca (data.maxdir