Group Permissions on root folders problem (Windows 10 TP build 10061)
Andrey Repin
anrdaemon@yandex.ru
Fri Sep 11 00:50:00 GMT 2015
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
More information about the Cygwin
mailing list