Cygwin: fork: restrict parent handle perms and drop handle after use

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-27 13:15:15 +01:00
parent 0fb497165f
commit 69cc7a0686
3 changed files with 7 additions and 3 deletions

View File

@@ -637,7 +637,8 @@ child_info_fork::handle_fork ()
bool
child_info_spawn::get_parent_handle ()
{
parent = OpenProcess (PROCESS_VM_READ, false, parent_winpid);
parent = OpenProcess (PROCESS_QUERY_LIMITED_INFORMATION, FALSE,
parent_winpid);
moreinfo->myself_pinfo = NULL;
return !!parent;
}