aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/release/3.3.4
AgeCommit message (Collapse)AuthorFilesLines
2022-10-19Cygwin: select: don't report read ready on a FIFO never opened for writingKen Brown1-0/+3
According to POSIX and the Linux man page, select(2) is supposed to report read ready if a file is at EOF. In the case of a FIFO, this means that the pipe is empty and there are no writers. But there seems to be an undocumented exception, observed on Linux and other platforms: If no writer has ever been opened, then select(2) does not report read ready. This can happen if a reader is opened with O_NONBLOCK before any writers have opened. This commit makes Cygwin consistent with those other platforms by introducing a special EOF test, fhandler_fifo::select_hit_eof, which returns false if there's never been a writer opened. To implement this we use a new variable '_writer_opened' in the FIFO's shared memory, which is set to 1 the first time a writer opens. New methods writer_opened() and set_writer_opened() are used to test and set this variable. Addresses: https://cygwin.com/pipermail/cygwin/2022-September/252223.html
2022-01-27Revert "Cygwin: fix permission problem when writing DAC info on Samba shares"Corinna Vinschen1-0/+4
This reverts commit 0390cc85727b0165b5cdfcff7578cac94ae3371d. 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>
2022-01-19Cygwin: add resolver fixes to release messageCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-18Cygwin: fhandler_base: Fix double free caused when open() fails.Takashi Yano1-0/+3
- When open fails, archetype stored in archetypes[] is not cleared. This causes double free when next open fail. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-January/250518.html
2022-01-18Cygwin: add release text for last two patchesCorinna Vinschen1-0/+7
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-12posix_spawn: fix get/set uid/gid calls for 32 bit CygwinCorinna Vinschen1-0/+3
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>
2022-01-11Cygwin: ACLs: ignore *_INHERIT flags in file ACLsCorinna Vinschen1-0/+3
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>
2021-12-26Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid a crashKen Brown1-0/+3
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
2021-12-12Cygwin: pty: Add missing input transfer when switch_to_pcon_in state.Takashi Yano1-0/+5
- 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
2021-12-08Cygwin: path: Convert UNC path prefix back to drive letter.Takashi Yano1-0/+5
- When symlink_info::check() is called with the path having drive letter and UNC path is mounted to the drive, the path is replaced with UNC path. With this patch, UNC path prefix is converted back to drive letter. This fixes the issue: https://cygwin.com/pipermail/cygwin/2021-November/250087.html https://cygwin.com/pipermail/cygwin/2021-December/250103.html
2021-12-07Cygwin: clipboard: Fix a bug in read().Takashi Yano1-0/+6
- Fix a bug in fhandler_dev_clipboard::read() that the second read fails with 'Bad address'. Addresses: https://cygwin.com/pipermail/cygwin/2021-December/250141.html