* kernel32.cc (CreateFileMappingW): Fix default standard rights for

file mappings from READ_CONTROL to STANDARD_RIGHTS_REQUIRED to allow
	changing the DACL (fixes "access denied" error in pinfo::set_acl).
This commit is contained in:
Corinna Vinschen 2014-08-27 10:44:50 +00:00
parent db1ff3b932
commit 37579836e3
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-08-27 Corinna Vinschen <corinna@vinschen.de>
* kernel32.cc (CreateFileMappingW): Fix default standard rights for
file mappings from READ_CONTROL to STANDARD_RIGHTS_REQUIRED to allow
changing the DACL (fixes "access denied" error in pinfo::set_acl).
2014-08-27 Corinna Vinschen <corinna@vinschen.de>
* ntea.cc (read_ea): Change left-over return to __leave. Fix

View File

@ -1,6 +1,6 @@
/* kernel32.cc: Win32 replacement functions.
Copyright 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin.
@ -311,7 +311,8 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
ULONG flags = 0;
ACCESS_MASK access = READ_CONTROL | SECTION_QUERY | SECTION_MAP_READ;
ACCESS_MASK access = STANDARD_RIGHTS_REQUIRED
| SECTION_QUERY | SECTION_MAP_READ;
ULONG prot = flProtect & (PAGE_NOACCESS | PAGE_READONLY | PAGE_READWRITE
| PAGE_WRITECOPY | PAGE_EXECUTE
| PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE