From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
Bengt Brodersen <bengt.brodersen@gmail.com>,
zsh-workers@zsh.org
Subject: Re: [Bug] Strange Globing Behaviour when used with sudo
Date: Wed, 30 May 2018 16:23:49 -0400 [thread overview]
Message-ID: <20180530202349.GA10754@osmium.lan> (raw)
In-Reply-To: <1527707719.3469997.1390875592.73AD29B6@webmail.messagingengine.com>
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. Using dtruss:
non-root:
open_nocancel("./\0", 0x1100004, 0x10040A3F8) = 3 0
fstatfs64(0x3, 0x7FFF5F8A1338, 0x10040A3F8) = 0 0
getdirentries64(0x3, 0x7FA30F805E00, 0x1000) = 112 0
getdirentries64(0x3, 0x7FA30F805E00, 0x1000) = 0 0
close_nocancel(0x3) = 0 0
stat64("./dummy/.\0", 0x7FFF5F8A1948, 0x1000) = -1 Err#20
stat64("./folder/.\0", 0x7FFF5F8A1948, 0x1000) = 0 0
root:
open_nocancel("./\0", 0x1100004, 0x10B5F8B28) = 3 0
fstatfs64(0x3, 0x7FFF547471B8, 0x10B5F8B28) = 0 0
getdirentries64(0x3, 0x7FAFD9821400, 0x1000) = 112 0
getdirentries64(0x3, 0x7FAFD9821400, 0x1000) = 0 0
close_nocancel(0x3) = 0 0
stat64("./dummy/.\0", 0x7FFF547477C8, 0x1000) = 0 0
stat64("./folder/.\0", 0x7FFF547477C8, 0x1000) = 0 0
<sys/errno.h> defines ENOTDIR as 20.
-Phil
next prev parent reply other threads:[~2018-05-30 20:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 17:11 Bengt Brodersen
2018-05-30 18:06 ` Bart Schaefer
2018-05-30 19:15 ` Daniel Shahaf
2018-05-30 20:23 ` Phil Pennock [this message]
2018-05-30 20:44 ` Bengt Brodersen
2018-05-30 20:49 ` Bengt Brodersen
2018-05-31 8:44 ` Peter Stephenson
[not found] ` <20180531094403.05b62bee@camnpupstephen.cam.scsc.local>
2018-05-31 8:49 ` Peter Stephenson
2018-05-31 11:39 ` Jun T
2018-05-31 15:29 ` Peter Stephenson
2018-05-31 18:15 ` Daniel Tameling
2018-06-01 14:08 ` Jun T.
2018-06-02 18:17 ` Daniel Tameling
2018-06-03 16:30 ` Jun T.
2018-06-03 18:48 ` Daniel Tameling
2018-06-03 19:17 ` dana
2018-06-04 1:23 ` Jun T
2018-06-04 12:48 ` Jun T
2018-06-14 12:26 ` Bengt Brodersen
2018-05-31 6:37 ` Martijn Dekker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180530202349.GA10754@osmium.lan \
--to=zsh-workers+phil.pennock@spodhuis.org \
--cc=bengt.brodersen@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).