From 64f50c2b3c29f3e6c5bd4fabef0f621e50058751 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 5 Jul 2007 09:35:36 +0000 Subject: [PATCH] * fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missing OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES. (fhandler_disk_file::rewinddir): Ditto. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_disk_file.cc | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1aa1eafba..c5079fa6a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2007-07-05 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missing + OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES. + (fhandler_disk_file::rewinddir): Ditto. + 2007-07-04 Corinna Vinschen * times.cc: Define __timezonefunc__ before including time.h to protect diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d693a9ddb..965495742 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1579,7 +1579,8 @@ fhandler_disk_file::opendir (int fd) { /* fdopendir() case. Just initialize with the emtpy upath and reuse the exisiting handle. */ - InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, + InitializeObjectAttributes (&attr, &upath, + OBJ_CASE_INSENSITIVE | OBJ_INHERIT, get_handle (), NULL); } else @@ -1939,7 +1940,8 @@ fhandler_disk_file::rewinddir (DIR *dir) IO_STATUS_BLOCK io; HANDLE new_dir; - InitializeObjectAttributes (&attr, &fname, OBJ_CASE_INSENSITIVE, + InitializeObjectAttributes (&attr, &fname, + OBJ_CASE_INSENSITIVE | OBJ_INHERIT, dir->__handle, NULL); status = NtOpenFile (&new_dir, SYNCHRONIZE | FILE_LIST_DIRECTORY, &attr, &io, FILE_SHARE_VALID_FLAGS,