[PATCH] libc: Replace i386/sys/fenv.h symlink with an #include shim
Same reasoning as fbaa0967. Signed-off-by: David Macek --- Excuse my ignorance, but is this acceptable? I'm not sure what actually happens with these files, but it'd be nice to get rid of the last symlink in the repo. newlib/libc/machine/i386/sys/fenv.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 12 => 100644 newlib/libc/machine/i386/sys/fenv.h diff --git a/newlib/libc/machine/i386/sys/fenv.h b/newlib/libc/machine/i386/sys/fenv.h deleted file mode 12 index 218057825e..00 --- a/newlib/libc/machine/i386/sys/fenv.h +++ /dev/null @@ -1 +0,0 @@ -../../x86_64/sys/fenv.h \ No newline at end of file diff --git a/newlib/libc/machine/i386/sys/fenv.h b/newlib/libc/machine/i386/sys/fenv.h new file mode 100644 index 00..d2c41a6d5a --- /dev/null +++ b/newlib/libc/machine/i386/sys/fenv.h @@ -0,0 +1,5 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include "../../x86_64/sys/fenv.h" -- 2.26.2.windows.1
[PATCH v2] cygwin: doc: Add keywords for ACE order issues
Windows Explorer shows a warning with Cygwin-created DACLs, but putting the text of the warning into Google doesn't lead to the relevant Cygwin docs. Let's copy the warning text into the docs in the hopes of helping confused users. Most of the credit for the wording belongs to Yaakov Selkowitz. Latest inquiry: <https://cygwin.com/pipermail/cygwin/2020-May/244814.html> Signed-off-by: David Macek --- I thought about the wording and there was one one advantage of the clumsy variant -- anyone intending to modify the paragraph would immediately know why the full message is there (in my opinion it doesn't add much value for the reader). In any case, here's the variant with nicer wording (which I also like better). winsup/doc/ntsec.xml | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 08a33bdc6c..8644965349 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -2159,11 +2159,13 @@ will correctly deal with the ACL regardless of the order of allow and deny ACEs. The second rule is not modified to get the ACEs in the preferred order. -Unfortunately the security tab in the file properties dialog of -the Windows Explorer insists to rearrange the order of the ACEs to -canonical order before you can read them. Thank God, the sort order -remains unchanged if one presses the Cancel button. But don't even -think of pressing OK... +Unfortunately, the security tab in the file properties dialog of +the Windows Explorer will pop up a warning stating "The permissions on +... are incorrectly ordered, which may cause some entries to be +ineffective." Pressing the Cancel button of the properties dialog +fortunately leaves the sort order unchanged, but pressing OK will cause +Explorer to canonicalize the order of the ACEs, thereby invalidating +POSIX compatibility. Canonical ACLs are unable to reflect each possible combination of POSIX permissions. Example: -- 2.26.2.windows.1
Re: [PATCH] cygwin: doc: Add keywords for ACE order issues
> +warning says "The permissions on ... are incorrectly orderer, which may Oof. Please fix "orderer" to "ordered" if accepted. -- David Macek
[PATCH] cygwin: doc: Add keywords for ACE order issues
Windows Explorer shows a warning with Cygwin-created DACLs, but putting the text of the warning into Google doesn't lead to the relevant Cygwin docs. Let's copy the warning text into the docs in the hopes of helping confused users. Latest inquiry: <https://cygwin.com/pipermail/cygwin/2020-May/244814.html> Signed-off-by: David Macek --- winsup/doc/ntsec.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 08a33bdc6c..b94cdd9a97 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -2163,7 +2163,10 @@ preferred order. the Windows Explorer insists to rearrange the order of the ACEs to canonical order before you can read them. Thank God, the sort order remains unchanged if one presses the Cancel button. But don't even -think of pressing OK... +think of pressing OK... For the sake +of people searching for this explanation, let's note that the Explorer +warning says "The permissions on ... are incorrectly orderer, which may +cause some entries to be ineffective." Canonical ACLs are unable to reflect each possible combination of POSIX permissions. Example: -- 2.26.2.windows.1
[PATCH 1/3 v3] Cygwin: accounts: Unify nsswitch.conf db_* defaults
Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 11 +-- winsup/doc/ntsec.xml | 21 ++--- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 57d90189d3..2d5fc488bb 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -626,15 +626,12 @@ cygheap_pwdgrp::init () grp_cache.cygserver.init_grp (); grp_cache.file.init_grp (); grp_cache.win.init_grp (); - /* Default settings: + /* Default settings (excluding fallbacks): passwd: files db group: files db db_prefix: auto DISABLED db_separator: + DISABLED - db_home: cygwin desc - db_shell: cygwin desc - db_gecos: cygwin desc db_enum: cache builtin */ pwd_src = (NSS_SRC_FILES | NSS_SRC_DB); @@ -831,12 +828,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); ++idx; } - /* If nothing has been set, revert to default. */ - if (scheme[0].method == NSS_SCHEME_FALLBACK) - { - scheme[0].method = NSS_SCHEME_CYGWIN; - scheme[1].method = NSS_SCHEME_DESC; - } } } break; diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 5287845686..a4c253098d 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -1507,19 +1507,16 @@ of each schema when used with db_home: -As has been briefly mentioned before, the default setting for -db_home: is +db_home: defines no default schemata. If this setting is not +present in /etc/nsswitch.conf, the aforementioned fallback +takes over, which is equivalent to a /etc/nsswitch.conf +settting of db_home: /home/%U - -So by default, Cygwin just sets the home dir to -/home/$USERNAME. - - @@ -1590,8 +1587,10 @@ when used with db_shell: -As for db_home:, the default setting for -db_shell: is pretty much a constant +db_shell: defines no default schemata. If this setting is +not present in /etc/nsswitch.conf, the aforementioned +fallback takes over, which is equivalent to a +/etc/nsswitch.conf settting of @@ -1664,13 +1663,13 @@ The following list describes the meaning of each schema when used with Fallback If none of the schemes given for db_gecos: - define a non-empty pathname, nothing is added to + define a non-empty string, nothing is added to pw_gecos. -The default setting for db_gecos: is the empty string. +db_gecos: defines no default schemata. -- 2.26.1.windows.1
[PATCH 1/3 v2] Cygwin: accounts: Unify nsswitch.conf db_* defaults
Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 11 +-- winsup/doc/ntsec.xml | 27 +++ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 57d90189d3..2d5fc488bb 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -626,15 +626,12 @@ cygheap_pwdgrp::init () grp_cache.cygserver.init_grp (); grp_cache.file.init_grp (); grp_cache.win.init_grp (); - /* Default settings: + /* Default settings (excluding fallbacks): passwd: files db group: files db db_prefix: auto DISABLED db_separator: + DISABLED - db_home: cygwin desc - db_shell: cygwin desc - db_gecos: cygwin desc db_enum: cache builtin */ pwd_src = (NSS_SRC_FILES | NSS_SRC_DB); @@ -831,12 +828,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); ++idx; } - /* If nothing has been set, revert to default. */ - if (scheme[0].method == NSS_SCHEME_FALLBACK) - { - scheme[0].method = NSS_SCHEME_CYGWIN; - scheme[1].method = NSS_SCHEME_DESC; - } } } break; diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 5287845686..032bebe4dc 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -874,9 +874,6 @@ set up to all default values: db_prefix:auto db_separator: + --> db_enum: cache builtin - db_home: /home/%U - db_shell: /bin/bash - db_gecos: empty The /etc/nsswitch.conf syntax @@ -1508,15 +1505,8 @@ of each schema when used with db_home: As has been briefly mentioned before, the default setting for -db_home: is - - - - db_home: /home/%U - - - -So by default, Cygwin just sets the home dir to +db_home: defines no schemata, which means only the fallback +option is used, so by default, Cygwin just sets the home dir to /home/$USERNAME. @@ -1591,14 +1581,11 @@ when used with db_shell: As for db_home:, the default setting for -db_shell: is pretty much a constant +db_shell: defines no schemata, which means only the fallback +option is used, so by default, Cygwin just sets the home dir to +/bin/bash. - - db_shell: /bin/bash - - - @@ -1664,13 +1651,13 @@ The following list describes the meaning of each schema when used with Fallback If none of the schemes given for db_gecos: - define a non-empty pathname, nothing is added to + define a non-empty string, nothing is added to pw_gecos. -The default setting for db_gecos: is the empty string. +The default setting for db_gecos: defines no schemata. -- 2.26.1.windows.1
[PATCH 2/3 v2] Cygwin: accounts: Don't keep old schemes when parsing nsswitch.conf
The implicit assumption seemed to be that any subsequent occurence of the same setting in nsswitch.conf is supposed to rewrite the previous ones completely. This was not the case if the third or any further schema was previously defined and the last line defined less than that (but at least 2), for example: ``` db_home: windows cygwin /myhome/%U db_home: cygwin desc ``` Let's document this behavior as well. Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 7 +++ winsup/doc/ntsec.xml | 5 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 2d5fc488bb..b733a6ee87 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -790,12 +790,12 @@ cygheap_pwdgrp::nss_init_line (const char *line) scheme = gecos_scheme; if (scheme) { - uint16_t idx = 0; + for (uint16_t idx = 0; idx < NSS_SCHEME_MAX; ++idx) + scheme[idx].method = NSS_SCHEME_FALLBACK; - scheme[0].method = scheme[1].method = NSS_SCHEME_FALLBACK; c = strchr (c, ':') + 1; c += strspn (c, " \t"); - while (*c && idx < NSS_SCHEME_MAX) + for (uint16_t idx = 0; *c && idx < NSS_SCHEME_MAX; ++idx) { if (NSS_CMP ("windows")) scheme[idx].method = NSS_SCHEME_WINDOWS; @@ -826,7 +826,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) } c += strcspn (c, " \t"); c += strspn (c, " \t"); - ++idx; } } } diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 032bebe4dc..b5996567f8 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -915,6 +915,11 @@ Apart from this restriction, the remainder of the line can have as many spaces and TABs as you like. + +When the same keyword occurs multiple times, the last one wins, as if the +previous ones were ignored. + + The passwd: and group: settings -- 2.26.1.windows.1
[PATCH 3/3] Cygwin: accounts: Report unrecognized db_* nsswitch.conf keywords
Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index b733a6ee87..e105248c20 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -828,6 +828,8 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); } } + else + debug_printf ("Invalid nsswitch.conf content: %s", line); } break; case '\0': -- 2.26.1.windows.1
License declaration
Patches to the Cygwin sources sent by me are licensed under the 2-clause BSD license. This applies to all past patches as well. I'll try to add a Signed-off-by to each patch. -- David Macek
[PATCH 2/2] cygheap_pwdgrp: Don't keep old schemes when parsing nsswitch.conf
The implicit assumption seemed to be that any subsequent occurence of the same setting in nsswitch.conf is supposed to rewrite the previous ones completely. This was not the case if the third or any further schema was previously defined and the last line defined less than that (but at least 2), for example: ``` db_home: windows cygwin /myhome/%U db_home: cygwin desc ``` Let's document this behavior as well. --- winsup/cygwin/uinfo.cc | 5 +++-- winsup/doc/ntsec.xml | 5 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 227faa4248..a4fcc33d8d 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -793,9 +793,10 @@ cygheap_pwdgrp::nss_init_line (const char *line) scheme = gecos_scheme; if (scheme) { - uint16_t idx = 0; + for (uint16_t idx = 0; idx < NSS_SCHEME_MAX; ++idx) + scheme[idx].method = NSS_SCHEME_FALLBACK; - scheme[0].method = scheme[1].method = NSS_SCHEME_FALLBACK; + uint16_t idx = 0; c = strchr (c, ':') + 1; c += strspn (c, " \t"); while (*c && idx < NSS_SCHEME_MAX) diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 5287845686..153ff1eac8 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -918,6 +918,11 @@ Apart from this restriction, the remainder of the line can have as many spaces and TABs as you like. + +When the same keyword occurs multiple times, the last one wins, as if the +previous ones were ignored. + + The passwd: and group: settings -- 2.26.1.windows.1
[PATCH 1/2] cygheap_pwdgrp: Don't invent undocumented defaults in nsswitch.conf
--- winsup/cygwin/uinfo.cc | 6 -- 1 file changed, 6 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 57d90189d3..227faa4248 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -831,12 +831,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); ++idx; } - /* If nothing has been set, revert to default. */ - if (scheme[0].method == NSS_SCHEME_FALLBACK) - { - scheme[0].method = NSS_SCHEME_CYGWIN; - scheme[1].method = NSS_SCHEME_DESC; - } } } break; -- 2.26.1.windows.1
[PATCH] cygheap_pwdgrp: Handle invalid db_* entries correctly
If the first scheme in db_* was invalid, the code would think there were no schemes specified and replace the second scheme with NSS_SCHEME_DESC. Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index bfcce00da0..be3c4855cc 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -823,7 +823,10 @@ cygheap_pwdgrp::nss_init_line (const char *line) c, e - c); } else - debug_printf ("Invalid nsswitch.conf content: %s", line); + { + debug_printf ("Invalid nsswitch.conf content: %s", line); + --idx; + } c += strcspn (c, " \t"); c += strspn (c, " \t"); ++idx; -- 2.26.1.windows.1
Re: [PATCH] doc/faq-using.xml: Add BeyondTrust and Cylance to BLODA
On 23. 2. 2018 14:22, david.mace...@gmail.com wrote: From: David Macek <david.mace...@gmail.com> My first attempt at git-send-email, please excuse and remove the extra line. -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] doc/faq-using.xml: Add BeyondTrust and Cylance to BLODA
From: David Macek <david.mace...@gmail.com> Cylance: - https://github.com/git-for-windows/git/issues/1244 - https://cygwin.com/ml/cygwin/2017-04/msg00238.html BeyondTrust: - https://cygwin.com/ml/cygwin/2017-04/msg00092.html - https://cygwin.com/ml/cygwin/2017-05/msg00422.html --- winsup/doc/faq-using.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index f583b36ef..4fca00525 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -1269,6 +1269,7 @@ behaviour which affect the operation of other programs, such as Cygwin. ATI Catalyst (some versions) AVAST (disable FILESYSTEM and BEHAVIOR realtime shields) Avira AntiVir +BeyondTrust PowerBroker BitDefender Bufferzone from Trustware ByteMobile laptop optimization client @@ -1277,6 +1278,7 @@ behaviour which affect the operation of other programs, such as Cygwin. ConEmu (try disabling "Inject ConEmuHk" or see https://conemu.github.io/en/ConEmuHk.html#Third_party_problems;>ConEmuHk documentation) Citrix Metaframe Presentation Server/XenApp (see http://support.citrix.com/article/CTX107825;>Citrix Support page) Credant Guardian Shield +CylancePROTECT Earthlink Total-Access Forefront TMG Google Desktop -- 2.16.2.windows.1
Re: [PATCH] doc/ntsec.xml: Fix typo
On 22. 2. 2018 12:04, Mark Geisert wrote: Been there, done that, even the "I'll have to try something else". It's astounding how SeaMonkey, Pine, and probably gmane bork up the formatting of something that looks so benignly laid out to begin with. After much experience putting up with these and other MUAs from us, Corinna really does know *the* solution that just works. 'git format-patch' followed by ''. Then I'll have to finally try `git send-email`. Any important tips? -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
Re: [PATCH] doc/ntsec.xml: Fix typo
On 2018-02-21 14:05, Corinna Vinschen wrote: The patch is malformed. It claims to contain 7 lines (6 lines context, one line changed), but actually it has only 4 lines context. Please check your git settings. On 21. 2. 2018 22:56, Brian Inglis wrote: I can see why you strenuously request git format-patch/send-email attachments ;^> I did use `git format-patch` to make that message (then sent using TB). I guess I'll have to try something else next time. -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] doc/ntsec.xml: Fix typo
--- winsup/doc/ntsec.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index df1d54930..03293591b 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -914,7 +914,7 @@ This is not valid: -Apart from this restriction, the reminder of the line can have as +Apart from this restriction, the remainder of the line can have as many spaces and TABs as you like. -- 2.16.2.windows.1 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Rename __in and __out in headers to avoid collision with Windows APIs
* string.h: Local variables in expansion of strdupa and strndupa * sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int --- Reposting to the newlib ML. There should be no API nor ABI changes, as the changed names are private to the macros. The new "s" in string.h comes from the __s parameter. The new "s" in wait.h comes from "status". I'm not sure what the naming conventions are, so I'm open to corrections. newlib/libc/include/string.h | 18 +- winsup/cygwin/include/sys/wait.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h index 29e0d44766..7833aa1561 100644 --- a/newlib/libc/include/string.h +++ b/newlib/libc/include/string.h @@ -141,16 +141,16 @@ int_EXFUN(strverscmp,(const char *, const char *)); #if __GNU_VISIBLE && defined(__GNUC__) #define strdupa(__s) \ - (__extension__ ({const char *__in = (__s); \ -size_t __len = strlen (__in) + 1; \ -char * __out = (char *) __builtin_alloca (__len); \ -(char *) memcpy (__out, __in, __len);})) + (__extension__ ({const char *__sin = (__s); \ +size_t __len = strlen (__sin) + 1; \ +char * __sout = (char *) __builtin_alloca (__len); \ +(char *) memcpy (__sout, __sin, __len);})) #define strndupa(__s, __n) \ - (__extension__ ({const char *__in = (__s); \ -size_t __len = strnlen (__in, (__n)) + 1; \ -char *__out = (char *) __builtin_alloca (__len); \ -__out[__len-1] = '\0'; \ -(char *) memcpy (__out, __in, __len-1);})) + (__extension__ ({const char *__sin = (__s); \ +size_t __len = strnlen (__sin, (__n)) + 1; \ +char *__sout = (char *) __builtin_alloca (__len); \ +__sout[__len-1] = '\0'; \ +(char *) memcpy (__sout, __sin, __len-1);})) #endif /* __GNU_VISIBLE && __GNUC__ */ /* There are two common basename variants. If you do NOT #include diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h index 69e1b9d9bf..dc89458437 100644 --- a/winsup/cygwin/include/sys/wait.h +++ b/winsup/cygwin/include/sys/wait.h @@ -88,7 +88,7 @@ inline int __wait_status_to_int (const union wait & __status) #else /* !__cplusplus */ #define __wait_status_to_int(__status) (__extension__ \ - (((union { __typeof(__status) __in; int __out; }) { .__in = (__status) }).__out)) + (((union { __typeof(__status) __sin; int __sout; }) { .__sin = (__status) }).__sout)) #endif /* __cplusplus */ -- 2.13.2.windows.1 -- David Macek
[PATCH] Rename __in and __out in headers to avoid collision with Windows APIs
* string.h: Local variables in expansion of strdupa and strndupa * sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int --- The new "s" in string.h comes from the __s parameter. The new "s" in wait.h comes from "status". I'm not sure what the naming conventions are, so I'm open to corrections. newlib/libc/include/string.h | 18 +- winsup/cygwin/include/sys/wait.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h index 29e0d44766..7833aa1561 100644 --- a/newlib/libc/include/string.h +++ b/newlib/libc/include/string.h @@ -141,16 +141,16 @@ int_EXFUN(strverscmp,(const char *, const char *)); #if __GNU_VISIBLE && defined(__GNUC__) #define strdupa(__s) \ - (__extension__ ({const char *__in = (__s); \ -size_t __len = strlen (__in) + 1; \ -char * __out = (char *) __builtin_alloca (__len); \ -(char *) memcpy (__out, __in, __len);})) + (__extension__ ({const char *__sin = (__s); \ +size_t __len = strlen (__sin) + 1; \ +char * __sout = (char *) __builtin_alloca (__len); \ +(char *) memcpy (__sout, __sin, __len);})) #define strndupa(__s, __n) \ - (__extension__ ({const char *__in = (__s); \ -size_t __len = strnlen (__in, (__n)) + 1; \ -char *__out = (char *) __builtin_alloca (__len); \ -__out[__len-1] = '\0'; \ -(char *) memcpy (__out, __in, __len-1);})) + (__extension__ ({const char *__sin = (__s); \ +size_t __len = strnlen (__sin, (__n)) + 1; \ +char *__sout = (char *) __builtin_alloca (__len); \ +__sout[__len-1] = '\0'; \ +(char *) memcpy (__sout, __sin, __len-1);})) #endif /* __GNU_VISIBLE && __GNUC__ */ /* There are two common basename variants. If you do NOT #include diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h index 69e1b9d9bf..dc89458437 100644 --- a/winsup/cygwin/include/sys/wait.h +++ b/winsup/cygwin/include/sys/wait.h @@ -88,7 +88,7 @@ inline int __wait_status_to_int (const union wait & __status) #else /* !__cplusplus */ #define __wait_status_to_int(__status) (__extension__ \ - (((union { __typeof(__status) __in; int __out; }) { .__in = (__status) }).__out)) + (((union { __typeof(__status) __sin; int __sout; }) { .__sin = (__status) }).__sout)) #endif /* __cplusplus */ -- 2.13.2.windows.1 -- David Macek
Re: [PATCH] Add COMODO Internet Security and ConEmu to BLODA
On 8. 6. 2017 14:48, David Macek wrote: > COMODO Internet Security: Causing GPG failures > <https://github.com/msys2/msys2/issues/38> I wonder if it makes sense to include GPG failures as a known symptom of dodgy apps. -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Add COMODO Internet Security and ConEmu to BLODA
ConEmu: There has been at least one report of it causing crashes <https://github.com/Maximus5/ConEmu/issues/1158> COMODO Internet Security: Causing GPG failures <https://github.com/msys2/msys2/issues/38> --- winsup/doc/faq-using.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index c62e03996..b6b152e4e 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -1273,6 +1273,8 @@ behaviour which affect the operation of other programs, such as Cygwin. Bufferzone from Trustware ByteMobile laptop optimization client COMODO Firewall Pro +COMODO Internet Security +ConEmu (try disabling "Inject ConEmuHk" or see https://conemu.github.io/en/ConEmuHk.html#Third_party_problems;>ConEmuHk documentation) Citrix Metaframe Presentation Server/XenApp (see http://support.citrix.com/article/CTX107825;>Citrix Support page) Credant Guardian Shield Earthlink Total-Access @@ -1298,7 +1300,7 @@ behaviour which affect the operation of other programs, such as Cygwin. Webroot Spy Sweeper with Antivirus Windows Defender Windows LiveOneCare -IBM Security Trusteer Rapport (see http://www-03.ibm.com/software/products/en/trusteer-rapport;>its home page +IBM Security Trusteer Rapport (see http://www-03.ibm.com/software/products/en/trusteer-rapport;>its home page) Sometimes these problems can be worked around, by temporarily or partially disabling the offending software. For instance, it may be possible to disable -- 2.13.0.windows.1 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Add MacType to BLODA
One more patch. MacType was observed by several users to cause `GPGME: Invalid crypto engine` failures in MSYS2. See <https://github.com/Alexpux/MSYS2-packages/issues/393>. I also removed two full stops in the sake of consistency. * faq-using.xml: Add Forefront TMG to the BLODA --- winsup/doc/faq-using.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index 35370f6..ae72145 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -1318,6 +1318,7 @@ behaviour which affect the operation of other programs, such as Cygwin. Citrix Metaframe Presentation Server/XenApp (see http://support.citrix.com/article/CTX107825;>Citrix Support page) Lavasoft Web Companion Forefront TMG +MacType Sometimes these problems can be worked around, by temporarily or partially disabling the offending software. For instance, it may be possible to disable @@ -1332,7 +1333,7 @@ it may be necessary to uninstall the software altogether to restore normal opera Some of the symptoms you may experience are: -Random fork() failures. +Random fork() failures Caused by hook DLLs that load themselves into every process in the system. POSIX fork() semantics require that the memory map of the child process must be an exact duplicate of the parent process' layout. If one of these DLLs @@ -1343,7 +1344,7 @@ DLL at that same address in the child, the fork() call has to fail. -File access problems. +File access problems Some programs (e.g., virus scanners with on-access scanning) scan or otherwise operate on every file accessed by all the other software running on your computer. In some cases they may retain an open handle on the file even -- 2.6.2.windows.1 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Add a section describing peculiarities of how Cygwin creates NTFS symlinks
First take on how to describe dereferencing of Cygwin-only symlinks path components when creating NTFS symlinks. Note that I haven't tried building the documentation, so I don't know if the added paragraph breaks anything. Hopefully not. * pathnames.xml: Add a section describing peculiarities of how Cygwin creates NTFS symlinks --- winsup/doc/pathnames.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml index cdbf9fa..9077303 100644 --- a/winsup/doc/pathnames.xml +++ b/winsup/doc/pathnames.xml @@ -407,6 +407,9 @@ these two settings, see . On AFS, native symlinks are the only supported type of symlink due to AFS lacking support for DOS attributes. This is independent from the winsymlinks setting. +Creation of native symlinks follows special rules to ensure the links +are usable outside of Cygwin. This includes dereferencing any Cygwin-only +symlinks that lie in the target path. -- 2.6.2.windows.1 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Add Forefront TMG to the BLODA
A user of MSYS2 had non-deterministic segfaults when running simple command from bash started from cmd. We've isolated the cause to `C:\Program Files (x86)\Forefront TMG Client\FwcWsp64.dll`. See <http://sourceforge.net/p/msys2/tickets/212/> for a little more information. It seems enough to include the software in BLODA, but if not, sorry for the unsolicited patch and let's discuss. * faq-using.xml: Add Forefront TMG to the BLODA --- winsup/doc/faq-using.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index 4cfc822..35370f6 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -1317,6 +1317,7 @@ behaviour which affect the operation of other programs, such as Cygwin. AVAST (disable FILESYSTEM and BEHAVIOR realtime shields) Citrix Metaframe Presentation Server/XenApp (see http://support.citrix.com/article/CTX107825;>Citrix Support page) Lavasoft Web Companion +Forefront TMG Sometimes these problems can be worked around, by temporarily or partially disabling the offending software. For instance, it may be possible to disable -- 2.6.2.windows.1 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[PATCH] Fix inconsistencies in docs regarding fstab and executable file detection
The inline list of mount options seemed redundant, so the paragraph now points to the list below it. List of executable extensions updated according to fhandler_disk_file.cc. List of executable magic numbers updated according to path.h (has_exec_chars). * pathnames.xml: Fix inconsistencies in docs regarding fstab and executable file detection --- winsup/doc/pathnames.xml | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml index 00eb133..cdbf9fa 100644 --- a/winsup/doc/pathnames.xml +++ b/winsup/doc/pathnames.xml @@ -81,9 +81,8 @@ see xref linkend=cygdrive/xref/para paraThe fourth field describes the mount options associated with the filesystem. It is formatted as a comma separated list of options. It contains at least the type of mount (binary or text) plus -any additional options appropriate to the filesystem type. Recognized -options are binary, text, nouser, user, exec, notexec, cygexec, nosuid, -posix=[0|1]. The meaning of the options is as follows./para +any additional options appropriate to the filesystem type. The list of +the options, including their meaning, follows./para screen acl - Cygwin uses the filesystem's access control lists (ACLs) to @@ -136,14 +135,14 @@ executability, this is not possible on filesystems which don't support permissions at all (like FAT/FAT32), or if ACLs are ignored on filesystems supporting them (see the aforementioned literalacl/literal mount option). In these cases, the following heuristic is used to evaluate if a file is -executable: Files ending in certain extensions (.exe, .com, .bat, .btm, -.cmd) are assumed to be executable. Files whose first two characters begin -with '#!' are also considered to be executable. +executable: Files ending in certain extensions (.exe, .com, .lnk) are +assumed to be executable. Files whose first two characters are #!, MZ, +or :\n are also considered to be executable. The literalexec/literal option is used to instruct Cygwin that the mounted file is executable. If the literalexec/literal option is used with a directory then all files in the directory are executable. This option allows other files to be marked as executable and avoids the -overhead of opening each file to check for a '#!'. The +overhead of opening each file to check for magic bytes. The literalcygexec/literal option is very similar to literalexec/literal, but also prevents Cygwin from setting up commands and environment variables for a normal Windows program, adding another small performance gain. The -- 2.3.5 -- David Macek smime.p7s Description: S/MIME Cryptographic Signature