X-Recipient: archive-cygwin AT delorie DOT 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=hD5avdBA4XyPqulz sbwKYrmpyvcGXm6G5PgdmpS+NFd0h+CWy2GQe3jjm40/rYg8CHJlRo61llw7a8cE 9AscqXL55rS8kq3++YEB97XKnxfBv1gEL71JDyJUpfevkzOfMyLY6d43Ddr3jPY1 Osa+NtgVNLd8DixdDuqXYa/1Pwo= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=R5P/3rwaN4k4fV/9Ja4Tzt jncxI=; b=Brl/ab1AgRe7CCDRj1uKHtnIL0iIhL3FGOOApO3jzY7WMxxA+2SRk8 k54IDXm+9wDGlxbhF1nH30T1wPLvpaD76Foj+Jjn4TWwx7+IYp4jbA9PkEKIjn8n aSYM26jAAKB49ViUXX/LmMPW4AwsTNHnlhOw0pg12s8LMxqhOHvL4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.ht-systems.ru Date: Fri, 11 Sep 2015 03:39:36 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <719333680.20150911033936@yandex.ru> To: Eric Blake , cygwin AT cygwin DOT com Subject: Re: Group Permissions on root folders problem (Windows 10 TP build 10061) In-Reply-To: <55F1BF8A.2050907@redhat.com> References: <20150616155843 DOT GE31537 AT calimero DOT vinschen DOT de> <20150905155916 DOT 8403bea8d4f631c1f7a314e3 AT nifty DOT ne DOT jp> <20150906114444 DOT GA27066 AT calimero DOT vinschen DOT de> <20150910200439 DOT bf06449af4f1e6efcb76676e AT nifty DOT ne DOT jp> <20150910172348 DOT GB26699 AT calimero DOT vinschen DOT de> <55F1BD86 DOT 1090001 AT redhat DOT com> <20150910173128 DOT GD26699 AT calimero DOT vinschen DOT de> <55F1BF8A DOT 2050907 AT redhat DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Eric Blake! >>>>> - if [ "\\\\${COMPUTERNAME,,*}" != "${LOGONSERVER,,*}" ] >>>>> + if [ "\\\\${COMPUTERNAME,,*}" != "${LOGONSERVER,,*}" \ >>>>> + -a "${LOGONSERVER}" != "\\\\MicrosoftAccount" ] >>>>> then >>>>> # Lowercase of USERDOMAIN >>>>> csih_PRIVILEGED_USERNAME="${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. >> >> 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. If a script author did not quote the indirect references, it is their fault, not an inherent "portability issue". I don't see, how your statement could be valid. The "[ ... ] && [ ... ]" doesn't mean the same as testing two conditions in one statement. -- With best regards, Andrey Repin Friday, September 11, 2015 02:57:58 Sorry for my terrible english... -- 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