diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | 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 <corinna@vinschen.de> + + * 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 <corinna@vinschen.de> * 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, |