* 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:
		| @@ -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> | 2006-10-21  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* fhandler.cc (fhandler_base::fhaccess): Call check_registry_access | 	* fhandler.cc (fhandler_base::fhaccess): Call check_registry_access | ||||||
|   | |||||||
| @@ -388,7 +388,8 @@ fhandler_base::fhaccess (int flags) | |||||||
|       res = check_file_access (get_win32_name (), flags); |       res = check_file_access (get_win32_name (), flags); | ||||||
|       goto done; |       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); |       res = check_registry_access (get_handle (), flags); | ||||||
|       close (); |       close (); | ||||||
|   | |||||||
| @@ -486,6 +486,7 @@ fhandler_registry::open (int flags, mode_t mode) | |||||||
| 	      } | 	      } | ||||||
| 	    else | 	    else | ||||||
| 	      { | 	      { | ||||||
|  | 		set_io_handle (registry_keys[i]); | ||||||
| 		flags |= O_DIROPEN; | 		flags |= O_DIROPEN; | ||||||
| 		goto success; | 		goto success; | ||||||
| 	      } | 	      } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user