Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Bug] Strange Globing Behaviour when used with sudo



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.



Messages sorted by: Reverse Date, Date, Thread, Author