* fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.

* security.cc (check_registry_access): Set errno to EROFS when checking
	for W_OK.
This commit is contained in:
Corinna Vinschen
2007-07-17 14:39:02 +00:00
parent a58a8938cc
commit 52a6e6d8c7
3 changed files with 16 additions and 1 deletions

View File

@ -2044,7 +2044,10 @@ check_registry_access (HANDLE hdl, int flags)
ret = check_access (sd, mapping, desired, flags);
/* As long as we can't write the registry... */
if (flags & W_OK)
ret = -1;
{
set_errno (EROFS);
ret = -1;
}
debug_printf ("flags %x, ret %d", flags, ret);
return ret;
}