aboutsummaryrefslogtreecommitdiff
path: root/io/ftw.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-10 23:59:02 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-10 23:59:02 +0000
commit1b1135980418c7825be04b835d09037d1c27bcaa (patch)
treed05acbf732ba6619139e6a1238afb48c7cb82538 /io/ftw.c
parent870a4e12539d12200d7946b0c7e1f6ca45530262 (diff)
downloadglibc-1b1135980418c7825be04b835d09037d1c27bcaa.zip
glibc-1b1135980418c7825be04b835d09037d1c27bcaa.tar.gz
glibc-1b1135980418c7825be04b835d09037d1c27bcaa.tar.bz2
Update.
2001-12-10 Thorsten Kukuk <kukuk@suse.de> * io/ftw.c (ftw_startup): Check, if the path is search and readable. * io/Makefile (tests): Add bug-ftw3. * io/bug-ftw3.c: New file.
Diffstat (limited to 'io/ftw.c')
-rw-r--r--io/ftw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io/ftw.c b/io/ftw.c
index 862774c..cbd6be7 100644
--- 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