ntdll: Restrict cases for std handle inheritance in CreateProcess().
commitbf97f9490a6a13b53ca7932ad0313022bc4ceee1
authorEric Pouech <epouech@codeweavers.com>
Thu, 30 Nov 2023 17:38:53 +0000 (30 18:38 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 30 Nov 2023 22:12:54 +0000 (30 23:12 +0100)
treef15d1b34337943efc500e871897ab4aa8005532f
parent000f7faaa24d8391c8bea222717681e25517a180
ntdll: Restrict cases for std handle inheritance in CreateProcess().

Only allow std handle inheritance when:
- either bInherit flag of CreateProcess is TRUE,
- or child process is in CUI subsystem and STARTF_USESTDHANDLES is no
  used.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
dlls/kernel32/tests/console.c
dlls/kernel32/tests/process.c
dlls/ntdll/unix/env.c
dlls/ntdll/unix/process.c
dlls/ntdll/unix/unix_private.h