aboutsummaryrefslogtreecommitdiff
path: root/winsup
AgeCommit message (Collapse)AuthorFilesLines
2022-02-05Cygwin: wincap: Add capabilities for Windows 10 2004 and newer.Takashi Yano1-1/+34
- The capability changes since Windows 10 2004 have been reflected in wincap.cc. (has_con_broken_il_dl has been changed to false.)
2022-02-05Cygwin: drop dllfixdbg scriptCorinna Vinschen2-82/+24
On second thought, we don't actually need this script. Express the entire action as sufficiently simple Makefile rule. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-05Cygwin: console: Remove unnecessary (redundant) code.Takashi Yano1-2/+0
2022-02-04Cygwin: fix dependency to dllfixdbg scriptCorinna Vinschen1-2/+2
Only the files created from cygwin0.dll depend on the script, not cygwin0.dll as well. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-04Cygwin: dllfixdbg: improve readabilityCorinna Vinschen1-60/+64
- formatting - use array pointer as argument rather than variable arguments - syntactical fixes - add comments - drop unnecessary recomputation of all section VMAs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-03Cygwin: dllfixdbg: honor Makefile verbositiy flag "V"Corinna Vinschen2-2/+2
In Makefile.am, add the value of $(V) to the dllfixdbg call. In dllfixdbg, if V=1, print what the script is doing. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-03Cygwin: dllfixdbg: don't overwrite input DLLCorinna Vinschen2-11/+10
Change dllfixdbg to keep the input DLL intact and just generate a new DLL matching the debug file. Fix Makefile rule accordingly. The result is, cygwin0.dll is the original DLL created with full debug sections and stays that way throughout the build process. Only new-cygwin1.dll will become the stripped DLL matching with the file containing the debug sections cygwin1.dbg. This is ok, because commit ba02fef995ac ("Cygwin: Makefile.am: fix DLL build rule") made new-cygwin1.dll the DLL to be installed. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-03Cygwin: console: Fix IL/DL escape sequence on the last line.Takashi Yano1-0/+12
- Currently, escape sequence IL/DL (CSI Ps L, CSI Ps M) does not work correctly at the last (bottom end) line. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-February/250736.html
2022-02-03Cygwin: path: Fix UNC path handling for SMB3 mounted to a drive.Takashi Yano1-2/+11
- If an UNC path is mounted to a drive using SMB3.11, accessing to the drive fails with error "Too many levels of symbolic links." This patch fixes the issue.
2022-02-02Cygwin: silence dllfixdbgCorinna Vinschen1-1/+1
There's no good reason to print the objcopy generation rules Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-02-02Cygwin: Makefile.am: fix DLL build ruleCorinna Vinschen1-7/+14
A single Makefile rule creates three files in three steps, the second and third one never showing up in dependencies. The next step creating the link lib only depends on the first of these files. Even if the second or third step in the DLL build rule fails, the next make invocation never picks up on this and just goes ahead creating the link lib. Fix this by splitting the DLL build rule into three rules, with every step on the way depending on the previous rule. Also fix up the names, TEST_DLL_NAME just doesn't cut it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-28Cygwin: drop autoloading kernel32 symbols available since Windows 7Corinna Vinschen1-6/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-27Revert "Cygwin: fix permission problem when writing DAC info on Samba shares"Corinna Vinschen2-4/+6
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-25Cygwin: ACLs: don't set indicator for default ACEs prematurelyCorinna Vinschen1-2/+0
Commit a2bfe7cae61a introduced a change ignoring default ACEs on files to come up with a valid POSIX ACL, reflecting the Windows ACEs actually making sense on files. However, if CREATOR OWNER or CREATOR GROUP ACEs - both only making sense as default ACEs - are found in the ACL, a value indicating the presence of default ACEs gets set, even on files. This in turn breaks a subsequent integrity check and get_posix_access returns EINVAL. The code path handling default ACEs on directories sets this indicator anyway, so don't set it just because one of the above SIDs are found. Fixes: a2bfe7cae61a ("Cygwin: ACLs: ignore *_INHERIT flags in file ACLs") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-19Cygwin: silence xsltproc when writing manpagesJon Turney1-3/+5
Unless make is invoked with V=1, have xmlto pass the parameter 'man.output.quietly=1' to xsltproc to suppress "Note: Writing foo.N" output from the manpages stylesheet.
2022-01-19Cygwin: silence xsltproc when writing chunked htmlJon Turney1-3/+5
Unless make is invoked with V=1, have xmlto pass the parameter 'chunk.quietly=1' to xsltproc to suppress "Writing foo.html for sect1(foo)" output from the chunker.xsl stylesheet.
2022-01-19Cygwin: silence dblatex when building PDFsJon Turney1-2/+5
Unless make is invoked with V=1, have xmlto pass '-q' to dblatex when building PDFs, to supress repeated "default template used in programlisting or screen" warnings from dblatex's verbatim.xsl stylesheet.
2022-01-19Cygwin: silence most custom build rulesJon Turney2-38/+38
2022-01-19Cygwin: resolver: cygwin_query() skip response header on internal errorAnton Lavrentiev via Cygwin-patches1-1/+2
- When dn_comp() failed internally there is no longer any need to fill the response header since it's now all cleared upon entry
2022-01-19Cygwin: Fix configure help for --{en,dis}able-doc optionJon Turney1-1/+1
Report '--disable-doc' in 'configure --help', as enable is the default.
2022-01-19Cygwin: add resolver fixes to release messageCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-19Cygwin: resolver: A few fixes for cygwin_query(), part 2Anton Lavrentiev via Cygwin-patches1-4/+5
Make sure Windows ResultSet is free'd when dn_comp failed internally
2022-01-19Cygwin: resolver: Targets in SRV DNS responses may not be compressedAnton Lavrentiev via Cygwin-patches1-0/+1
RFC2782 clearly says so yet it's a common misconception to perform the compression in the violation of the standard. This patch fixes that
2022-01-19Cygwin: resolver: Fix to match response ID with request IDAnton Lavrentiev via Cygwin-patches2-2/+11
In case when the native OS resolver is used (via os_query) the returned response ID is always 0. It should actually match the ID passed in to res_send() in the DNS request header. This patch fixes that
2022-01-19Cygwin: resolver: A few fixes for cygwin_query()Anton Lavrentiev via Cygwin-patches1-8/+13
- Make sure the answer buffer is properly cleared so there is no trailing garbage when the response does not fit entirely in; - Make sure an internal decomp failure gets reported correctly (w/return code -1); - Make sure that the buffer is not overrun when filling out the header.
2022-01-19Cygwin: resolver: Process options forward (not backwards)Anton Lavrentiev via Cygwin-patches1-4/+6
Also, make sure the debug setting propagates to the parser of the remainder of /etc/resolv.conf
2022-01-18Cygwin: fhandler_base: Fix double free caused when open() fails.Takashi Yano2-2/+5
- 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-18Cygwin: path_conv: do not get confused by a directory with `.lnk` suffixJohannes Schindelin1-0/+1
When trying to create a directory called `xyz` in the presence of a directory `xyz.lnk`, the Cygwin runtime errors out with an `ENOENT`. The root cause is actually a bit deeper: the `symlink_info::check()` method tries to figure out whether the given path refers to a symbolic link as emulated via `.lnk` files, but since it is a directory, that is not the case, and that hypothesis is rejected. However, the `fileattr` field is not cleared, so that a later `.exists()` call on the instance mistakenly thinks that the symlink actually exists. Let's clear that field. This fixes https://github.com/msys2/msys2-runtime/issues/81 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-01-18Cygwin: resolver: Added processing of AAAA recordsAnton Lavrentiev via Cygwin-patches1-8/+7
AAAA records returned from Windows resolver were flagged as "No structure" in debug output because of being processed (although correctly) in the default catch-all case. This patch makes the AAAA records properly recognized.
2022-01-18Cygwin: resolver: A little more consistency in debug messagesAnton Lavrentiev via Cygwin-patches1-7/+7
2022-01-18Cygwin: resolver: Format spec consistency for Windows errorsAnton Lavrentiev via Cygwin-patches1-4/+4
2022-01-18Cygwin: resolver: Debug to output both IP and port # in native b.o.Anton Lavrentiev via Cygwin-patches1-14/+22
Also, change a few other debug output spots for consistency
2022-01-17Use matching format for NTSTATUSAnton Lavrentiev via Cygwin-patches1-2/+2
2022-01-17Fix format specifier for wide-char stringAnton Lavrentiev via Cygwin-patches1-1/+1
2022-01-14Cygwin: pty: Fix race issue between closing and opening master.Takashi Yano1-4/+10
- If the from_master is closed before cleaning up other pipes, such as from_slave_nat, the same pty may be allocated and pty master may try to open the pipe which is not closed yet, and it will fail. This patch fixes the issue.
2022-01-14Cygwin: console: Fix potential deadlock regarding acuqiring mutex.Takashi Yano2-3/+6
- Acquiring input_mutex and attach_mutex in console code has potential risk of deadlock. This patch fixes the issue.
2022-01-14Cygwin: pty: Stop closing and recreating attach_mutex.Takashi Yano4-43/+23
- Closing attach_mutex and recreating it causes the race issue between pty and console codes. With this patch, attach_mutex is created only once in a process which opens pty, and never closed in order to avoid this issue. Addresses: https://cygwin.com/pipermail/cygwin-developers/2021-December/012548.html
2022-01-14Cygwin: pty: Fix memory leak in master_fwd_thread.Takashi Yano3-1/+7
- If master_fwd_thread is terminated by cygthread::terminate_thread(), the opportunity to release tmp_pathbuf is missed, resulting in a memory leak. This patch fixes the issue.
2022-01-14Cygwin: pty, console: Fix deadlock in GDB regarding mutex.Takashi Yano6-53/+115
- GDB inferior may be suspended while the inferior grabs mutex. This causes deadlock in terminal I/O. With this patch, timeout for waiting mutex is set to 0 for the debugger process when the process calls CreateProcess() with DEBUG_PROCESS flag to avoid deadlock. This may cause the race issue in GDB, however, there is no other way than that. Addresses: https://cygwin.com/pipermail/cygwin-developers/2021-December/012542.html
2022-01-12Cygwin: doc: drop mention of 32-bit installerJon Turney2-52/+34
Drop mention of 32-bit installer, since it's offically discouraged, and planned to be dropped soon. Adjust various references to be something more generic, like 'the Cygwin Setup program' to accommodate this.
2022-01-12fhandler_proc.cc(format_proc_cpuinfo): add Linux 5.16 Gobble Gobble flagsBrian Inglis1-0/+4
0x00000007:1 Intel Advanced Matrix eXtensions: EAX:22 amx_bf16 Brain Float 16 dot product EAX:24 amx_tile Tile matrix multiply EAX:25 amx_int8 Int 8 byte dot product 0x80000008:0 AMD EBX:27 cppc Collaborative Processor Performance Control
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-12Cygwin: Makefile: add dependency to newlib's libsCorinna Vinschen1-1/+2
We need deps to newlib's libc.a and libm.a, otherwise changes in newlib code don't trigger a rebuild of the Cygwin DLL. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-11Cygwin: ACLs: ignore *_INHERIT flags in file ACLsCorinna Vinschen2-3/+9
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>
2022-01-10Cygwin: do not build MinGW testsuite/cygrun --with-cross-bootstrapYaakov Selkowitz1-0/+2
2021-12-26Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid a crashKen Brown2-2/+14
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-20cygwin: Add cocom and patch to build prerequisites in FAQJon Turney1-5/+5
Add patch, and make cocom unconditional in list of build prerequisites. Even though the products of these tools are checked in, these tools are required when building in a fresh git checkout, presumably due to the order in which git creates the files resulting in timestamps which indicate that the output of rules using these tools are older than the inputs. Addresses: https://cygwin.com/pipermail/cygwin/2021-December/250124.html Also drop a duplicate sentence about 'fetch sources from git'.
2021-12-17Cygwin: Conditionally build documentationJon Turney4-8/+39
Add a configure option '--disable-doc' to disable building of the documentation by the 'all' target. Check for the required tools at configure time, and require them if building documentation is enabled. Even if building the documentation was diabled with '--disable-doc', 'make -C doc' at the top-level can still make the documentation, if the documentation tools were found. If the tools were not found, 'missing' is used to issue a warning about that. Update instructions for building Cygwin appropriately. (Building documentation remains the default to increase the chances of noticing when building the documentation is broken.)
2021-12-15Cygwin: pty: Fix input switching failure.Takashi Yano2-1/+5
- This patch fixes the failure of input switching between io_handle and io_handle_nat. This very rarely happens, however, input is wrongly switched to io_handle_nat even though the non-cygwin app is in the background.