public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Jürgen Wagner" <juergen@wagner.is>
To: cygwin@cygwin.com
Subject: Re: Challenge: a VERY strange problem with command substitution in bash
Date: Fri, 28 Jul 2017 18:03:00 -0000	[thread overview]
Message-ID: <cad625b1-7d70-834d-3d80-fd0d72d03a38@wagner.is> (raw)
In-Reply-To: <20170711232506.02CE91C3666@atlantis.udag.de>

[-- Attachment #1: Type: text/plain, Size: 4953 bytes --]

Hello,
  I apologize for not responding earlier - but a project kept me overly
busy, so extra cycles to reply here were not available.

The winner is: Richard Beels. Yes, you are right. Comodo was the source
of my problems.

What's funny is that when I migrated to Win10, I ran into this before
and had it fixed using some magic settings in Comodo. Magic because the
way the setting needed to be made to really work was against logic.

Now, just prior to my posting, the problem re-occurred, so I naturally
did not think of Comodo again causing this.
As it turns out, the culprit was a Windows Update that somehow undid the
settings in Comodo that I had carefully made before.
In the meantime, I had another run of Windows Update that influenced the
function of the Comodo firewall - resulting in rendering it partially
ineffective until reboot.

So, thanks for the quick feedback to all... yes, I managed to fix it again.

And for the record:
- Comodo Antivirus has not caused any problems.
- Comodo Auto-containment is fine, you may just want to exclude Cygwin
from the applications that may be contained. Not essential, though.
- Comodo HIPS I have on paranoid mode, anyway, just don't suppress any
pop-ups.
- Comodo VirusScope should only affect contained applications.
- Comodo Website Filterings is not really relevant, but I have it OFF,
anyway.
- Comodo Firewall has not caused any problems.
So, that's it? No. in the settings of Comodo, there is another section
"Advanced Protection" with the ominous title "Miscellanous".
- Heuristics: can cause issues with some scripts, I have it turned off.
- Detection of shellcode injections breaks some Cygwin mechanisms, turn
it off.
So, that's it? No. The shellcode injections option actually has a list
of exclusions.
If you simply turn the feature off, it won't help making Cygwin work.
You have to explicitly enable it, add all applications to the exclusion
list, then disable it.
Et voilá! Cygwin works.

Cheers,
--Jürgen


On 12.07.2017 01:22, Richard Beels via cygwin wrote:
> At 07/11/2017 at 15:12, Shakespearean monkeys danced on Jürgen
> Wagner's keyboard and said:
>> ...
>> Using backquotes instead of the command substitution with $(...) does
>> not change the results. I could swear this did work in an earlier
>> version of Cygwin on my Windows 7 machine.
>>
>> I tried this to see if the code in the parentheses is executed at all:
>>
>> $ value="$( date 2> foo | cat )"; echo "$? <$value>"
>>
>> The file "foo" was not created, i.e., it seems the commands don't
>> really get executed.
>>
>> $ value="$( date && pwd )"; echo "$? <$value>"
>> 0 <Tue Jul 11 20:49:09 CEST 2017
>> /home/juergen>
>>
>> $ value="$( date || pwd )"; echo "$? <$value>"
>> 0 <Tue Jul 11 20:32:27 CEST 2017>
>>
>> both work, so some control structures seem to be permissible... just
>> not a pipe.
>>
>> What is going on? Some misconfiguration? A Cygwin bug? Some
>> interaction with something weird in Windows 10? I am at loss to
>> understand what could be wrong... and am now most curious whether
>> anybody has an idea what is causing this. Does it work/not work in
>> the same way in your Cygwin installation?
>>
>> I came across this effect because ssh-host-config did not recognize
>> me as administrator anymore. It's due to a check for a certain user
>> group that uses a command substitution with a pipe. Replacing this
>> with an equivalent command works. The original line used "id -G" and
>> then a "grep -Eq" to check whether a certain group is on that list.
>>
>> I am VERY curious now! I've rarely been puzzled that much by such a
>> very elementary shell expression (looking back at 34 years of Unix
>> experience).
>
>
> Hi Jurgen.
>
> 90% chance it's what is called bloda in these parts.  It's in the FAQ
> on cygwin.com.  I'll go out on a limb and say you might have just
> installed/changed your AV/Firewall software.
>
> And if I want to be super-psychic, can I guess comodo?  Because I just
> changed to comodo a couple weeks ago and had the same subshell/command
> substitution/pipeline errors you're mentioning.
>
> If so, you need to exclude your cygwin folder from AV scanning.
> AND...  if the software does whitelisting or host intrusion protection
> (HIPS) or "run unknown executables in a container/sandbox" or
> something similar, you also need to trust all the executables, too. 
> Or switch to something else that doesn't trip cygwin's trigger.
>
> After doing that and a rebaseall, I haven't had a fork error in a
> week.  I can't wait to run setup and come up with an update process,
> though...
>
> Cheers!
>
>
> -- 
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3986 bytes --]

  parent reply	other threads:[~2017-07-28  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 19:12 Jürgen Wagner
2017-07-11 19:16 ` Jürgen Wagner
2017-07-11 20:40   ` Jürgen Wagner
2017-07-11 23:22 ` Steven Penny
2017-07-11 23:24 ` Richard Beels via cygwin
     [not found] ` <59655e58.d532240a.ae3d8.4253SMTPIN_ADDED_MISSING@mx.google.com>
2017-07-12  6:08   ` Wouter van Doorn
     [not found] ` <20170711232506.02CE91C3666@atlantis.udag.de>
2017-07-28 18:03   ` Jürgen Wagner [this message]
2017-12-04 13:01 Erik Haukjær Andersen
2017-12-04 13:22 ` David Macek
2017-12-04 21:41   ` Brian Inglis
2017-12-04 20:20 ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cad625b1-7d70-834d-3d80-fd0d72d03a38@wagner.is \
    --to=juergen@wagner.is \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).