[newlib-cygwin] Cygwin: fork: add PROCESS_VM_OPERATION to child process permissions

Corinna Vinschen corinna@sourceware.org
Mon Feb 18 09:56:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7e671e75787777c9ab8a1144a10c1187b7ced984

commit 7e671e75787777c9ab8a1144a10c1187b7ced984
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Sun Feb 17 22:51:21 2019 +0100

    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>

Diff:
---
 winsup/cygwin/release/3.0.1 | 13 +++++++++++++
 winsup/cygwin/sigproc.cc    |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/release/3.0.1 b/winsup/cygwin/release/3.0.1
new file mode 100644
index 0000000..ae6e03e
--- /dev/null
+++ b/winsup/cygwin/release/3.0.1
@@ -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
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 30dfaaa..3b6492b 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -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;



More information about the Cygwin-cvs mailing list