mailing list of musl libc
 help / color / mirror / code / Atom feed
From: James Y Knight <jyknight@google.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH] In glob(), do not require that the target of a symlink exists.
Date: Tue, 30 Jul 2019 12:04:57 -0400	[thread overview]
Message-ID: <CAA2zVHoFGiR=B14u6xo_Jg5xnQVCOd+ZYSQ4_BSNfY2cSH1U3g@mail.gmail.com> (raw)
In-Reply-To: <CAA2zVHqaLrSQK5dwD5H1D5ndSix70ztEvtHnki0SGop-Vp-u2A@mail.gmail.com>

Ping -- is this patch ok?

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:04 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 [this message]
2019-07-30 16:13   ` Rich Felker
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='CAA2zVHoFGiR=B14u6xo_Jg5xnQVCOd+ZYSQ4_BSNfY2cSH1U3g@mail.gmail.com' \
    --to=jyknight@google.com \
    --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).