Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 22 Jul 2019 20:37:38 -0400
From: James Y Knight <jyknight@...gle.com>
To: musl@...ts.openwall.com
Subject: [PATCH] In glob(), do not require that the target of a symlink exists.

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.

Download attachment "0001-In-glob-do-not-require-that-the-target-of-a-symlink-.patch" of type "application/octet-stream" (2736 bytes)

Download attachment "0001-Add-some-basic-tests-for-glob.patch" of type "application/octet-stream" (6876 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.