From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53222 invoked by alias); 11 Sep 2015 00:50:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 53213 invoked by uid 89); 11 Sep 2015 00:50:14 -0000 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 Received: from smtp.ht-systems.ru (HELO smtp.ht-systems.ru) (78.110.50.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 11 Sep 2015 00:50:12 +0000 Received: from [95.165.144.62] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) (Authenticated sender: postmaster@rootdir.org) id 1ZaCXV-0000FM-TT ; Fri, 11 Sep 2015 03:50:05 +0300 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 11 Sep 2015 00:39:37 -0000 Date: Fri, 11 Sep 2015 00:50:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <719333680.20150911033936@yandex.ru> To: Eric Blake , cygwin@cygwin.com Subject: Re: Group Permissions on root folders problem (Windows 10 TP build 10061) In-Reply-To: <55F1BF8A.2050907@redhat.com> References: <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> <55F1BF8A.2050907@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00170.txt.bz2 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