URL:
<http://savannah.gnu.org/bugs/?53465>
Summary: Outdated GNU glob handles d_type incorrectly for
GLOB_ONLYDIR
Project: make
Submitted by: dalias
Submitted on: Sun 25 Mar 2018 05:11:34 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.2.1
Operating System: Any
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
The code in GNU glob that handles GLOB_ONLYDIR when d_type is available fails
to account for symlinks (DT_LNK) and thereby breaks glob expansion (e.g.
$(wildcard ...), maybe other cases) in the case where non-final path
components are symlinks.
This issue affects musl libc now that its public headers define
_DIRENT_HAVE_D_TYPE, and any other implementation defining _DIRENT_HAVE_D_TYPE
where gnulib decides to replace the system glob with the GNU glob that GNU
make ships. It was originally reported on the musl mailing list:
http://www.openwall.com/lists/musl/2018/03/13/1
Upstream GNU glob fixed this issue a long time ago by adding a check for
DT_LNK, but the fix was not incorporated into make's copy.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53465>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make