This reverts commit 0390cc8572.
There's no indication what exact situation this patch was supposed to
solve, and local testing doesn't show any such problems. However, this
patch itself introduced a new problem, as outlined by
https://cygwin.com/pipermail/cygwin/2022-January/250629.html
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
32 bit Cygwin still exports function calls to support old applications.
E. g., when switching from 16 to 32 bit uid/gid values, new function
like getuid32 have been added and the old getuid function still only
provides 16 bit values. Newly built applications using getuid are
actually calling getuid32.
However, this link magic isn't performed inside Cygwin itself, so if
newlib functions call getuid, they actually call the old getuid, not
the new getuid32. This leads to truncated uid/gid values.
https://cygwin.com/pipermail/cygwin/2022-January/250453.html reports
how this leads to problems in posix_spawn.
Fix this temporarily. i686 support will go away soon in Cygwin and the
fix can be dropped.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
get_posix_access() creates DEF_*_OBJ aclent_t entries from Windows ACEs
with INHERIT flags set, independent of the file type. These flags only
make sense on directory objects, but certain Windows functions don't
check the file type and allow INHERIT ACE flags even on non-directories.
As a fix, make sure to ignore the INHERIT flags on non-directory ACLs
and don't propagate the matching DEF_*_OBJ aclent_t entries to callers.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
NtQueryInformationProcess(ProcessHandleInformation) can return
STATUS_SUCCESS with invalid handle data for certain processes
("minimal" processes on Windows 10). This can cause a crash when
there's an attempt to access that data. Fix that by setting
NumberOfHandles to zero before calling NtQueryInformationProcess.
Addresses: https://cygwin.com/pipermail/cygwin-patches/2021q4/011611.html
- This patch fixes the bug that input is wrongly sent to io_handle_nat
rather than io_handle when neither read() nor select() is called
after the cygwin app is started from non-cygwin app. This happens
only if psuedo console is disabled.
Addresses:
https://cygwin.com/pipermail/cygwin-patches/2021q4/011587.html