directory which lacks read privileges.
+2003-11-05 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::opendir): Detect attempt
+ to open a directory which lacks read privileges.
+
2003-11-04 Corinna Vinschen <corinna@vinschen.de>
* external.cc (cygwin_internal): Add CW_GET_POSIX_SECURITY_ATTRIBUTE
set_errno (ENOMEM);
else if ((dir->__d_dirname = (char *) malloc (len + 3)) == NULL)
{
- free (dir);
set_errno (ENOMEM);
+ free (dir);
}
else if ((dir->__d_dirent =
(struct dirent *) malloc (sizeof (struct dirent))) == NULL)
{
+ set_errno (ENOMEM);
+ free (dir);
free (dir->__d_dirname);
+ }
+ else if (access_worker (pc, R_OK) != 0)
+ {
free (dir);
- set_errno (ENOMEM);
+ free (dir->__d_dirname);
}
else
{