delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/06/15/12:22:29

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04876387088B
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=ncsu.edu
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=josh_thompson AT ncsu DOT edu
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu.edu; s=google;
h=from:to:cc:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=95xkeQRc5euvWJ/x0kIsYL5njCGt2nyWN6YWVJo/Ljc=;
b=SeJ6GzbyX2lpA0iLOUlfVCG2PDvAZZy4vw5XAy7K/9Hu9a40/BXKqQs24nlgN08pxP
rm6Yp67BcdZFwy9Tfva9FkkNOO895Kk1TyDDdIclmDwXEms8h1MHTiJ6duQihdH83/Tt
b5a0xRZTNP4rqF+L0zdHL6hH9YJoZVyf+UUMnh59R89Bk9vw1X8IKeG6rSvd2ZDPlatz
NkYF7WbEAkHA2doJv6Auu2g/NidJ+1dQyVIAkO1csslK1kGS+GAG3PphhSkv6EtsHWDw
WORa3WUHDSUXrAoC2ulQ510nk1ZkNIgKbtuVwbV3OL/KWOu7/02HnqSUVRF0lwRSUndx
E5xQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=95xkeQRc5euvWJ/x0kIsYL5njCGt2nyWN6YWVJo/Ljc=;
b=RwWZrJHo+4Qz4rHusiIMmxMWRm+tF87iJl0BXYbG5dNQvmFKwnTLl1u74ZpkYXx8MM
riZydOyYX/IkgSOZU5LA2JHFbl7tctnUtYOrD4sUW3hQ9FY4c/Jj2ymcC3jfzAn+Qq1P
UR3z1cTqnaal/oX8R0qob7jvwgV12cUNplC/Fc6YEtckWXu6LnDCnCgXWb4Tve/jprQk
hiuqcD65kbLeA5UUFqCkIo2DK7x1C1qR0c8vypgjiRoDirEfcWiRxzQTlDfVi2HKbzvX
prqNDCW5uzrN4Rhj8J0nTDuOtBf4Aj7o77Rtra32v8cC7JnACLp0aFeI5JvpbHKMv5xe
vV/w==
X-Gm-Message-State: AOAM531VXk+gkSZJ37y+Xss3EXEx+G4aB4dmFeDlrvwr9PEplPWCQ4jJ
SPlYRZT39szdUI8nXQagPdmfS/chS8ryRQvUUQ2Hsj8nT5vp5wkNpXIMkjolxGC6sjtvQBYAFrG
EUv0id+NKHpL+/ILBE7dyx6eZ07O8pUGwYRFcjlDnTJptZcgo8SAl5Mh62l/y2bU=
X-Google-Smtp-Source: ABdhPJyRSMqCz17mIDd4YZtn8i1MlL7D5yrDDaVqgMmu7RNwzeUDbjr13entY1g3Y2Ihtdl9fG021g==
X-Received: by 2002:ac8:176f:: with SMTP id u44mr17581143qtk.0.1592238094677;
Mon, 15 Jun 2020 09:21:34 -0700 (PDT)
From: Josh Thompson <josh_thompson AT ncsu DOT edu>
To: cygwin AT cygwin DOT com
Subject: change in handling quotes in cygwin package from 3.1.4-1 to 3.1.5-1
Date: Mon, 15 Jun 2020 12:21:28 -0400
Message-ID: <3394273.JRUgpOGd2y@dvr>
MIME-Version: 1.0
X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS,
TVD_PH_BODY_ACCOUNTS_PRE autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Cc: dev AT vcl DOT apache DOT org
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Cygwin community,

I'm a developer on the Apache VCL project which is a private cloud management 
platform.  We've used Cygwin for many years to allow VCL management systems to 
ssh in to Windows nodes to manage them.  We're very grateful for the Cygwin 
project and how helpful it has been to us for many years.  :)

We recently noticed a change in double quote (") handling that is causing a 
command we issue to fail.  The command is:

cmd.exe /c "mkdir \"C:/Cygwin/home/root/VCL\""

In 3.1.4-1 and previous versions, the command works as expected.

In 3.1.5-1, it returns this error:

The filename, directory name, or volume label syntax is incorrect.

The command is being issued to a bash shell that is opened over ssh.  I really 
don't know why it was decided to use cmd.exe to launch mkdir instead of just 
using mkdir through bash, but that's how the VCL code currently is.  The 
command is in a utility function that can be passed various paths to create.  
In the case listed above, the escaped quotes wouldn't be needed.  However, if 
the path passed in contained any spaces, the quotes become necessary.

I chatted with jturney and avih on IRC about this (thanks jturney and avih!).  
jturney pointed out using echo instead of mkdir also illustrated the problem.

in 3.1.4:

$ cmd.exe /c "echo \"C:/Cygwin/home/root/VCL\""
"C:/Cygwin/home/root/VCL"

in 3.1.5:

$ cmd.exe /c "echo \"C:/Cygwin/home/root/VCL\""
\"C:/Cygwin/home/root/VCL\"

And, this can be simplified even more to just

3.1.4:
$ cmd.exe /c "echo \""
"

3.1.5:
$ cmd.exe /c "echo \""
\"

avih brought up a valid point that it may now be quoting the quotes since they 
are part of the argument list.  However, I can't come up with the proper 
escaping of things to use mkdir to create a directory with a space in it with 
the new behavior.

jturney asked if I would email this list about the issue.

Thanks for any help!

Josh Thompson
- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found on pool.sks-keyservers.net

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQRMIdRtWXideTZDK31X8tBw1209AwUCXuegCAAKCRBX8tBw1209
A09tAJ0f2c3/9LaHdYxbprt6IRem8i90ogCfeUNV0SQJFKfIMo8klnr+EiX+oNE=
=Dzm0
-----END PGP SIGNATURE-----



--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019