Cygwin: fork: add PROCESS_VM_OPERATION to child process permissions

...on parent process.  This is required for successful mmap propagation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-02-17 22:51:21 +01:00
parent 7c34811440
commit 7e671e7578
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
What's new:
-----------
What changed:
-------------
Bug Fixes
---------
- Relax fork child permissions to avoid a potential fork failure.
Addresses: https://cygwin.com/ml/cygwin/2019-02/msg00234.html

View File

@ -815,7 +815,7 @@ child_info::child_info (unsigned in_cb, child_info_types chtype,
we're forking, we also need handle duplicate access. */
parent = NULL;
DWORD perms = PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ
| SYNCHRONIZE;
| PROCESS_VM_OPERATION | SYNCHRONIZE;
if (type == _CH_FORK)
{
perms |= PROCESS_DUP_HANDLE;