mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Re: [PATCH] In glob(), do not require that the target of a symlink exists.
Date: Tue, 30 Jul 2019 12:13:36 -0400	[thread overview]
Message-ID: <20190730161336.GA1506@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAA2zVHoFGiR=B14u6xo_Jg5xnQVCOd+ZYSQ4_BSNfY2cSH1U3g@mail.gmail.com>

On Tue, Jul 30, 2019 at 12:04:57PM -0400, James Y Knight wrote:
> Ping -- is this patch ok?

I think the logic is right, but I need to look again. I was confused
by the comment changes of the patch.

Rich


> On Mon, Jul 22, 2019 at 8:37 PM James Y Knight <jyknight@google.com> wrote:
> >
> > Previously, when given a trailing path component with no
> > metacharacters, glob would call stat to check if the provided filename
> > existed, which would fail on a broken symlink. When expanding a
> > pattern however, glob would trust the list of files returned by
> > readdir, and thus would return broken symlinks.
> >
> > Now, be consistent and allow broken symlinks in both cases, by using
> > lstat to determine file existence.
> >
> > If GLOB_MARK is specified, stat must still be used to determine
> > whether a given name refers to a directory or file. But if that fails,
> > a symlink is simply considered to be a file for marking purposes.


  reply	other threads:[~2019-07-30 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  0:37 James Y Knight
2019-07-30 16:04 ` James Y Knight
2019-07-30 16:13   ` Rich Felker [this message]
2019-07-31 20:35     ` Stephane Chazelas
2019-08-06  2:03 ` Rich Felker

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=20190730161336.GA1506@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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/musl/

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).