On 01/08/2011 03:34 PM, Eric Blake wrote: > I just filed: http://sourceware.org/bugzilla/show_bug.cgi?id=12378 > > which is in turn the root cause of this findutils bug: > https://savannah.gnu.org/bugs/index.php?32043 > > Basically, fnmatch("[","[",0) is required by POSIX 2008 to return 0, but > in glibc, it returns FNM_NOMATCH. > > (It's behavior was more or less undefined in POSIX 2001, because it > represented an unterminated bracket expression which is thus an invalid > glob; but POSIX 2008 tightened the definition of globs to require that a > leading bracket that does not introduce a bracket expression must match > itself, in light of the fact that the [ utility (aka test) is an example > of a file name that looks like an unterminated bracket expression but > does not trigger globbing.) > > I'm not sure how simple the fix will be, or how fast it will be patched > in glibc, but since gnulib copies the glibc definition, we'll need to > fix the gnulib implementation of fnmatch.
Glibc 2.13 has now fixed the bug, but gnulib and glibc have diverged a while ago, so it's a bit of a project to backport all the changes (including this particular fix). I'm not sure when I'll get around to it, and welcome anyone else doing the sync first. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature