[PATCH] Cygwin: resolver: cygwin_query() skip response header on internal error

2022-01-19 Thread Anton Lavrentiev via Cygwin-patches
- When dn_comp() failed internally there is no longer any need to fill the response header since it's now all cleared upon entry --- winsup/cygwin/libc/minires-os-if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/libc/minires-os-if.c

[PATCH] Cygwin: resolver: A few fixes for cygwin_query(), part 2

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
Make sure Windows ResultSet is free'd when dn_comp failed internally --- winsup/cygwin/libc/minires-os-if.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 5da1c0c55..c6fde776a 100644 ---

[PATCH 1/2] Cygwin: resolver: Fix to match response ID with request ID

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
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 --- winsup/cygwin/libc/minires-os-if.c | 6 +- winsup/cygwin/libc/minires.c | 7

[PATCH 2/2] Cygwin: resolver: Targets in SRV DNS responses may not be compressed

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
RFC2782 clearly says so yet it's a common misconception to perform the compression in the violation of the standard. This patch fixes that --- winsup/cygwin/libc/minires-os-if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/libc/minires-os-if.c

Cygwin: resolver: more fixes

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
Proposed are two fixes for more little bugs in the resolver. The first one fixes the ID field returned in the response to match the ID of the request (even in the case when the OS-supplied native resolver is used). The second one is about the standard compliance (when the response is relayed from

[PATCH] Cygwin: resolver: A few fixes for cygwin_query()

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
- 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. ---

[PATCH] Cygwin: resolver: Process options forward (not backwards)

2022-01-18 Thread Anton Lavrentiev via Cygwin-patches
Also, make sure the debug setting propagates to the parser of the remainder of /etc/resolv.conf --- winsup/cygwin/libc/minires.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c index 0cf9efd9b..fdc6087f5

[PATCH 4/5] Cygwin: resolver: A little more consitency in debug messages

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index f71178b96..6b4c5e33e 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 5/5] Cygwin: resolver: Added processing of AAAA records

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
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 records properly recognized. --- winsup/cygwin/libc/minires-os-if.c | 15 +++ 1 file

[PATCH 3/5] Cygwin: resolver: Format spec consitency for Windows errors

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 6e17de0b8..f71178b96 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 1/5] Cygwin: resolver: Debug to output both IP and port # in native b.o.

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
Also, change a few other debug output spots for consitency --- winsup/cygwin/libc/minires.c | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c index 0979daae3..0cf9efd9b 100644 ---

[PATCH 2/5] Cygwin: resolver: Process options forward (not backwards)

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c index 0cf9efd9b..fdc6087f5 100644 --- a/winsup/cygwin/libc/minires.c +++ b/winsup/cygwin/libc/minires.c @@ -86,12 +86,12 @@

[no subject]

2022-01-17 Thread Anton Lavrentiev via Cygwin-patches
Resubmitting the patches with the requested commit message changes

[PATCH 6/7] Message consistency

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index f71178b96..6b4c5e33e 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 7/7] Added processing of AAAA records

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 6b4c5e33e..fd2e37a31 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 5/7] Format consitency for Windows errors

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 6e17de0b8..f71178b96 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 4/7] Process options forward (not backwards)

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c index 58c0438d3..2a77098b8 100644 --- a/winsup/cygwin/libc/minires.c +++ b/winsup/cygwin/libc/minires.c @@ -86,12 +86,12 @@

[PATCH 3/7] Debug output to show both IP and port # in native b.o., a few little cosmetic improvements for consistency

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c index 0979daae3..58c0438d3 100644 --- a/winsup/cygwin/libc/minires.c +++ b/winsup/cygwin/libc/minires.c

[PATCH 2/7] Use matching format for NTSTATUS

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 666a008de..6e17de0b8 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++

[PATCH 1/7] Fix format specifier for wide-char string

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/libc/minires-os-if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c index 565158150..666a008de 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++ b/winsup/cygwin/libc/minires-os-if.c

Cygwin: A few fixes for local resolver

2022-01-14 Thread Anton Lavrentiev via Cygwin-patches
I am sending this patch that has fallen through the cracks almost a year ago, because I switched to a different project and it was forgotten. I just discovered it now, and I also added the record processing as discussed back on Feb 1, 2021. - Use %S (instead of %s) when a wide-character

[PATCH] CYGWIN: Fix resolver debugging output

2021-01-29 Thread Anton Lavrentiev via Cygwin-patches
- Use %S (instead of %s) when a wide-character output is due; - Use native byte order for host and add port when doing I/O with DNS server; - Use forward way for resolv.conf's "options" processing, so listing "debug" as a first option, will show all following option(s) as they are read; -

[PATCH] Fix trace output for getdomainname()

2020-12-04 Thread Anton Lavrentiev via Cygwin-patches
--- winsup/cygwin/net.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 724e787fe..cec0a70cc 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -772,7 +772,7 @@ getdomainname (char *domain, size_t len)

[PATCH] Cygwin: /proc/[PID]/stat to pull process priority correctly

2019-11-30 Thread Anton Lavrentiev via cygwin-patches
Fix to prior commit 5fa9a0e7 to address https://cygwin.com/ml/cygwin/2019-08/msg00082.html --- winsup/cygwin/fhandler_process.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index

[PATCH] cygrunsrv: Added options -T and -X; fixed a couple minor issues

2019-11-13 Thread Anton Lavrentiev via cygwin-patches
1. https://www.cygwin.com/ml/cygwin-patches/2019-q4/msg00107.html 2. Fixed an issue with "premature exit" error message printed if service is stopped from SCM by an operator 3. Fixed a potential issue with reporting 0 exit code when a service being stopped did not actually stop --- ChangeLog

[PATCH] Cygwin: getpriority() consistent with process priority

2019-10-30 Thread Anton Lavrentiev via cygwin-patches
https://cygwin.com/ml/cygwin/2019-08/msg00122.html --- winsup/cygwin/syscalls.cc | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index a914ae8..20126ce 100644 --- a/winsup/cygwin/syscalls.cc +++