From 52a6e6d8c7466fe78ab755ae2895dfc0948e401d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 17 Jul 2007 14:39:02 +0000 Subject: * 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. --- winsup/cygwin/security.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/security.cc') diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 130b92d25..2c3cb141c 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -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; } -- cgit v1.2.3