[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #53465] Outdated GNU glob handles d_type incorrectly for GLOB_ONLYD

From: Rich Felker
Subject: [bug #53465] Outdated GNU glob handles d_type incorrectly for GLOB_ONLYDIR
Date: Sun, 25 Mar 2018 13:11:36 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0


                 Summary: Outdated GNU glob handles d_type incorrectly for
                 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



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:


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:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]