From: Ulrich Drepper Date: Mon, 10 Dec 2001 23:51:23 +0000 (+0000) Subject: (ftw_startup): Check, if the path is search and readable. X-Git-Tag: cvs/glibc-2-2-5~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10b9b5ee59df301e77a9b6e3a70e4c7e734201ec;p=thirdparty%2Fglibc.git (ftw_startup): Check, if the path is search and readable. --- diff --git a/io/ftw.c b/io/ftw.c index 862774c9721..cbd6be707e2 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