* 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.
This commit is contained in:
Corinna Vinschen
2006-10-22 09:38:47 +00:00
parent 70158cafd7
commit 2b26c2fc41
3 changed files with 10 additions and 1 deletions

View File

@@ -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 ();