zsh-workers
 help / color / mirror / code / Atom feed
From: Devin Hussey <husseydevin@gmail.com>
To: "Lawrence Velázquez" <vq@larryv.me>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Ignore EACCES when doing non-pure globbing
Date: Tue, 12 Jan 2021 19:53:53 -0500	[thread overview]
Message-ID: <CAEtFKssoysK5T33JHZPKeoxaRwBaWtj0jYZJeqCpGMv7CF65pw@mail.gmail.com> (raw)
In-Reply-To: <C8F03324-5C35-478B-AA59-FD1CAA297B65@larryv.me>

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

We are already violating POSIX with our globbing:

"If the pattern does not match any existing filenames or pathnames, the
pattern string shall be left unchanged."

Therefore, this:

zsh:1: no matches found: /tmp/inaccessible/a/*

is wrong, it should just print this:

/tmp/inaccessible/a/*

Also, at least with the implementation on my device, the glob() function
works fine as long as the folder has execute permission. (The sample was
wrong, it should be 111, not 000)

On Tue, Jan 12, 2021, 6:47 PM Lawrence Velázquez <vq@larryv.me> wrote:

> > On Jan 12, 2021, at 5:42 PM, Devin Hussey <husseydevin@gmail.com> wrote:
> >
> > Even if we can't access a parent folder, there is still a chance we can
> > access a subdirectory.
>
> I might be mistaken (entirely possible!), but this behavior seems
> to violate POSIX volume 3 chapter 2 section 2.13.3, which states
> in part that
>
>         Specified patterns shall be matched against existing filenames
>         and pathnames, as appropriate. Each component that contains a
>         pattern character shall require read permission in the directory
>         containing that component. Any component, except the last, that
>         does not contain a pattern character shall require search
> permission.
>
> (
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_03
> )
>
> vq

[-- Attachment #2: Type: text/html, Size: 2425 bytes --]

  reply	other threads:[~2021-01-13  0:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 22:42 Devin Hussey
2021-01-12 22:48 ` Devin Hussey
2021-01-12 23:47 ` Lawrence Velázquez
2021-01-13  0:53   ` Devin Hussey [this message]
2021-01-13  1:12     ` Devin Hussey
2021-01-13  1:28       ` Bart Schaefer
2021-01-13  1:26     ` Mikael Magnusson
     [not found]       ` <CAEtFKsuDqhu3USSVCcrt-8rkvA_yAkHt=eU+FY6=pNu+gVogMw@mail.gmail.com>
2021-01-13  2:14         ` Devin Hussey
2021-01-13  3:01           ` Devin Hussey

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=CAEtFKssoysK5T33JHZPKeoxaRwBaWtj0jYZJeqCpGMv7CF65pw@mail.gmail.com \
    --to=husseydevin@gmail.com \
    --cc=vq@larryv.me \
    --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).