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 42895
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [Bug] Strange Globing Behaviour when used with sudo
- Date: Wed, 30 May 2018 16:23:49 -0400
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Bengt Brodersen <bengt.brodersen@xxxxxxxxx>, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201804; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=m89qOsfbu57S+jsDpQ8QpHW7dF3o71nEx0igR7Xol30=; b=RIqRJrDfX20w3IkBGC2jGEaCul /0Dz3V8jkqB1q9UOyc8GvkRepCn2KormrxfX+3HLn7u3cG+YQZ24s+RJqB9oVOMT6ZCYhNWzRmht9 Gyniw31B3+5A7xRGysM7CLwAr80P6mHaewGBivu8uUJbRwbhlSKBInLtcJ5ZCEupNEG0FEH8VHYQw TBcx8dRM9tcltkc4vr5jPcibx0J6aHIQNNjJ1sGkyRs9KUteYIuGDU9u3BZFq5DqQncXKaxs/Eyd/ +TrW2lHmN5xpqaeavya+ub8PZkpAn29xgCL57V9LbKeGfro8ZQ7GVGiAVQkskeP53a8sReG0wRTWx EhDz+kIw==;
- Dkim-signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201804e2; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=m89qOsfbu57S+jsDpQ8QpHW7dF3o71nEx0igR7Xol30=; b=eNmIIQ6pQNJgcq4WrgE4dByNS hehtNucit6bKXp2a3Y8C6qWc8HvCw2uI0YMg68jkBqclPA/0jGySo17WyQ1CA==;
- In-reply-to: <1527707719.3469997.1390875592.73AD29B6@webmail.messagingengine.com>
- 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
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
- References: <CAMaoPXzXBv4pAD1_=Lr78h3iT+yhZfSq0CgEs+QMTVeDaR28Vw@mail.gmail.com> <CAH+w=7YxodoKJhA9-xswA5H7vckiHHzFTO_MqR5Ahux0p3h6NQ@mail.gmail.com> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author