Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-10-22 13:38:47 +0400
committerCorinna Vinschen <corinna@vinschen.de>2006-10-22 13:38:47 +0400
commit2b26c2fc410ad29dbc2e906e98845c06db79e726 (patch)
tree0ea43f760a6cc1a7f7153b49012b7e78dd52a061
parent70158cafd7476846467afb6e50224d1fd20b644f (diff)
* fhandler.cc (fhandler_base::fhaccess): Check if opening registry
actually created a handle. This handles the registry root dir. * fhandler_registry.cc (fhandler_registry::open): Set io_handle in case of opening one of the predefined registry keys.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler.cc3
-rw-r--r--winsup/cygwin/fhandler_registry.cc1
3 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d82f63974..1f67f578a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::fhaccess): Check if opening registry
+ actually created a handle. This handles the registry root dir.
+ * fhandler_registry.cc (fhandler_registry::open): Set io_handle in
+ case of opening one of the predefined registry keys.
+
2006-10-21 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fhaccess): Call check_registry_access
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 2933a1712..64669da87 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -388,7 +388,8 @@ fhandler_base::fhaccess (int flags)
res = check_file_access (get_win32_name (), flags);
goto done;
}
- else if (get_device () == FH_REGISTRY && allow_ntsec && open (O_RDONLY, 0))
+ else if (get_device () == FH_REGISTRY && allow_ntsec && open (O_RDONLY, 0)
+ && get_handle ())
{
res = check_registry_access (get_handle (), flags);
close ();
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index 57525f4bc..ecb7f7474 100644
--- a/winsup/cygwin/fhandler_registry.cc
+++ b/winsup/cygwin/fhandler_registry.cc
@@ -486,6 +486,7 @@ fhandler_registry::open (int flags, mode_t mode)
}
else
{
+ set_io_handle (registry_keys[i]);
flags |= O_DIROPEN;
goto success;
}