Cygwin: fork/exec: fix child process permissions

- Exec'ed/spawned processes don't need PROCESS_DUP_HANDLE.  Remove that
  permission from the parent handle.

- PROCESS_QUERY_LIMITED_INFORMATION doesn't work for Windows 7 if the
  process is started as a service.  Add PROCESS_QUERY_INFORMATION for
  pre-Windows 8 in that case.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-29 16:26:45 +01:00
parent c86b2f549b
commit 5a0f2c00aa
5 changed files with 38 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ details. */
/* UID/GID */
void uinfo_init ();
bool check_token_membership (HANDLE, PSID);
bool check_token_membership (PSID);
#define ILLEGAL_UID ((uid_t)-1)