X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type; q=dns; s=default; b=oVqy
	iisAsxIZngVcgBBEein5PqsTXUitgLunH7/mKeb+pqwaVJkwX+AEH4QVV6YA5qxG
	BFgwO2rpVJ8o0ZhbkoQgp5hR+RCsOONVqhj9sJsM/fNf4UoU1zmtypy+eFJPf8x3
	IoKHuFLoEm/EHOXgOjlokxBfuzGlfoln0BXG3J8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type; s=default; bh=6f9h+DowuC
	M9mi1sBLKgG+5mnA4=; b=nojLVz10uMjlVMtEaoNZQfxULf3V6mtHWBg67rTLJ6
	MbebBX0L9Lebs54KU6UOwq5UioDWXHcsHCuZRn7wF6nF4PsE72GVQmRqLDIkrceX
	8UNStINHwe2UiQ4x5LJH6U2yAlejrZxk2gxqHunmz7cz6+CrDrXliXs8D3j9hN7n
	w=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: mx1.redhat.com
Subject: Re: Group Permissions on root folders problem (Windows 10 TP build 10061)
To: cygwin@cygwin.com
References: <CAMH9mcFEL3mao+m-DEYM84kC1HOPeSBpZXD+mDf0USobF9oY7g@mail.gmail.com> <CAMH9mcFOKjvjiFvvk1ju0ZxBDK28MaktdnYwj5_CjvbgnpVO4A@mail.gmail.com> <20150616155843.GE31537@calimero.vinschen.de> <20150905155916.8403bea8d4f631c1f7a314e3@nifty.ne.jp> <20150906114444.GA27066@calimero.vinschen.de> <20150910200439.bf06449af4f1e6efcb76676e@nifty.ne.jp> <20150910172348.GB26699@calimero.vinschen.de> <55F1BD86.1090001@redhat.com> <20150910173128.GD26699@calimero.vinschen.de>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Message-ID: <55F1BF8A.2050907@redhat.com>
Date: Thu, 10 Sep 2015 11:36:10 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <20150910173128.GD26699@calimero.vinschen.de>
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fGXDgxG1Q8GQNkHMX84FK1KSvLIPim65G"
X-IsSubscribed: yes

--fGXDgxG1Q8GQNkHMX84FK1KSvLIPim65G
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 09/10/2015 11:31 AM, Corinna Vinschen wrote:

>>>> -      if [ "\\\\${COMPUTERNAME,,*}" !=3D "${LOGONSERVER,,*}" ]
>>>> +      if [ "\\\\${COMPUTERNAME,,*}" !=3D "${LOGONSERVER,,*}" \
>>>> +	   -a "${LOGONSERVER}" !=3D "\\\\MicrosoftAccount" ]
>>>>        then
>>>>  	# Lowercase of USERDOMAIN
>>>>        	csih_PRIVILEGED_USERNAME=3D"${COMPUTERNAME,,*}+${username}"
>>>
>>> Thanks a lot, much appreciated.  Patch applied.
>>
>> [ ... -a ... ] is not portable; there are some inherently ambiguous
>> situations that it cannot handle. POSIX recommends that you spell it [
>> ... ] && [ ... ] instead.
>=20
> Does this matter in this very situation?  This is always running under
> bash, btw.  Bash's a requirement for the csih helper script.

Because you are at least using bash, you will get consistent behavior;
and because both ... are 3-argument tests, it is unlikely that one of
the tests can be confused with other operators like '(' or ')'.  So, I
guess it's okay to leave it alone here.  But even with bash, the use of
-a can cause problems when testing user-supplied variables that might
happen to expand to text that looks like potential operators.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--fGXDgxG1Q8GQNkHMX84FK1KSvLIPim65G
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJV8b+KAAoJEKeha0olJ0NqFhIH/R3D3++p8kTs5FrenNToUreF
dYzcjzrj1uxY3NcqZaFm9s7Msyc4/NVEwIWzKZ+p2p8nKh7ynB4+SDnXcHJekNNB
28xAM8F8KzCuV92tBX7COapy7UKRUxX7hi7GAt5TG4CtY7r3mXOquUF7WvLnTwOr
eBk3eQQ2Uh/wzbIelBwt6qkY+iygnJUbGfiLWUcKKUrfnEC5D7hDHBVP4chOeqJC
hgI5hsN1hcFJsnkEK2vAOZ+5BXYoMOI8ZW+uFCDkVeu+muwKNwmB9PnbJFoTWNcS
k0jAOzWoQO+8+fQRLHwPIc0Y8Dca66Shx0gsNKJdko1ZXtrZTG/BRBio5HnatOg=
=T8gK
-----END PGP SIGNATURE-----

--fGXDgxG1Q8GQNkHMX84FK1KSvLIPim65G--
