diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-10-22 09:38:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-10-22 09:38:47 +0000 |
commit | 2b26c2fc410ad29dbc2e906e98845c06db79e726 (patch) | |
tree | 0ea43f760a6cc1a7f7153b49012b7e78dd52a061 /winsup/cygwin/fhandler.cc | |
parent | 70158cafd7476846467afb6e50224d1fd20b644f (diff) | |
download | cygnal-2b26c2fc410ad29dbc2e906e98845c06db79e726.tar.gz cygnal-2b26c2fc410ad29dbc2e906e98845c06db79e726.tar.bz2 cygnal-2b26c2fc410ad29dbc2e906e98845c06db79e726.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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 (); |