Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Bug] Strange Globing Behaviour when used with sudo
- X-seq: zsh-workers 42896
- From: Bengt Brodersen <bengt.brodersen@xxxxxxxxx>
- To: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- Subject: Re: [Bug] Strange Globing Behaviour when used with sudo
- Date: Wed, 30 May 2018 22:44:27 +0200
- Cc: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eITP/B43tX3rss35jWPCsGxsoYnSRxtxbIndrmbcEms=; b=YGHFmD+ftTb6mCO7aiu8mIX+XZZfAuyIQz/Q3/uJFyIqwrrp92j2ty97jpaToiSQah Hzyhn9Bod36T/P90hTsVNrjerYRvnIAYgQp74krZD/FJYxPx4ZPg4rXkZ1hvJMGoNWXS pGY6rqZ8JczHsCNS7W2CannKcnVE+T2Z9Pjv6laPjdPOmOkjmOoA004uiI05z5hOYwaZ RUGKXNNAv8N6nYDyoJHIWcqw3U/2LGq/8HqO1H2SIa/5LnZtasFvNoV+fAHf6noCGdpY h6RTcsqCz/bFKwVhPmmbU7JiDlSEjB1SL7I3r2DPyMrX6vnMGRkiwxvJXM2t4+k0y0wq PkiA==
- In-reply-to: <20180530202349.GA10754@osmium.lan>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAMaoPXzXBv4pAD1_=Lr78h3iT+yhZfSq0CgEs+QMTVeDaR28Vw@mail.gmail.com> <CAH+w=7YxodoKJhA9-xswA5H7vckiHHzFTO_MqR5Ahux0p3h6NQ@mail.gmail.com> <1527707719.3469997.1390875592.73AD29B6@webmail.messagingengine.com> <20180530202349.GA10754@osmium.lan>
If you google *mac stat64 deprecated* you will get a lot of results.
So maybe it caused by the depreciation on darwin os
On Wed, 30 May 2018 at 22:24 Phil Pennock <
zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> 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
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author