diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-10-22 19:31:33 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-10-22 19:31:33 +0000 |
commit | fc545fe9333fc89c691bf45b938e50f511365829 (patch) | |
tree | 3208edbed6f6da9f41d9b681b828b57d10d7d141 /winsup/cygwin/security.cc | |
parent | 2be593d961e3ccd21a7a19b5a0b716e43d0137dc (diff) | |
download | cygnal-fc545fe9333fc89c691bf45b938e50f511365829.tar.gz cygnal-fc545fe9333fc89c691bf45b938e50f511365829.tar.bz2 cygnal-fc545fe9333fc89c691bf45b938e50f511365829.zip |
* fhandler_disk_file.cc (fhandler_disk_file::facl): Fix whitespace.
* external.cc: Update copyright.
* fhandler.cc: Ditto.
* sec_helper.cc: Ditto.
* security.h: Ditto.
* security.cc: Ditto.
(check_registry_access): Return -1 if W_OK is requested.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r-- | winsup/cygwin/security.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 856ba42ed..0a4f55761 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -1,6 +1,7 @@ /* security.cc: NT security functions - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Red Hat, Inc. Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de Completely rewritten by Corinna Vinschen <corinna@vinschen.de> @@ -1973,6 +1974,9 @@ check_registry_access (HANDLE hdl, int flags) desired |= KEY_QUERY_VALUE; if (!get_nt_object_security (hdl, SE_REGISTRY_KEY, sd)) ret = check_access (sd, mapping, desired, flags); + /* As long as we can't write the registry... */ + if (flags & W_OK) + ret = -1; debug_printf ("flags %x, ret %d", flags, ret); return ret; } |