From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11415 invoked by alias); 31 May 2018 06:54:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42901 Received: (qmail 13454 invoked by uid 1010); 31 May 2018 06:54:51 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.59.109.123):SA:0(-1.9/5.0):. Processed in 1.754517 secs); 31 May 2018 06:54:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: [Bug] Strange Globing Behaviour when used with sudo To: zsh-workers@zsh.org References: <1527707719.3469997.1390875592.73AD29B6@webmail.messagingengine.com> <20180530202349.GA10754@osmium.lan> From: Martijn Dekker Message-ID: Date: Thu, 31 May 2018 08:37:05 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180530202349.GA10754@osmium.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Op 30-05-18 om 22:23 schreef Phil Pennock: > On 2018-05-30 at 19:15 +0000, Daniel Shahaf wrote: >>> On Wed, May 30, 2018 at 10:11 AM, Bengt Brodersen >>>> sudo zsh -c 'echo ./*/' >>>>>> ./file/ ./folder/ > >> - macOS 10.13.4 (17E202) >> - zsh 5.5.1 (x86_64-apple-darwin17.5.0) >> >> and that the issue still occurred under -fc. > > This appears to be macOS returning different results for stat64() for > root vs non-root. I can confirm this behaviour on Mac OS X 10.11.6 with zsh versions 5.0.7 through 5.5.1 (I didn't test earlier zsh versions). According to my testing, bash, dash, yash, mksh/lksh do *not* act this way when running as root on the Mac -- only zsh does. FYI, FWIW, HTH. - M.