Bug 819680
Summary: | librpmio.so exports bundled broken glob(3) clone | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Frank Ch. Eigler <fche> | |
Component: | rpm | Assignee: | Fedora Packaging Toolset Team <packaging-team> | |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rawhide | CC: | ffesti, fweimer, jakub, jan.kratochvil, jistone, jnovy, mjw, packaging-team, pknirsch, pmatilai | |
Target Milestone: | --- | Keywords: | Upstream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 819682 (view as bug list) | Environment: | ||
Last Closed: | 2012-11-18 14:13:52 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 819682 |
Description
Frank Ch. Eigler
2012-05-08 00:33:56 UTC
Yup, blasts from the past... So is glibc glob() now returning dangling symlinks again? If so, when did it change? (In reply to comment #1) > Yup, blasts from the past... > > So is glibc glob() now returning dangling symlinks again? If so, when did it > change? No it is not. #include <glob.h> #include <stdlib.h> #include <string.h> int main () { glob_t g; memset (&g, 0, sizeof (g)); int ret = glob ("*foo*", 0, NULL, &g); __builtin_printf ("%d %zu\n", ret, g.gl_pathc); return 0; } $ ln -s barfoobaz bazfoobar $ ./glob 3 0 Doesn't match, but $ ln -s /dev/null bazfoobaz 0 1 Does match. See http://sourceware.org/bugzilla/show_bug.cgi?id=866 But you might want to ask on the bug whether or not it may be reopened, the new glibc team has been revisiting old bug reports to see if any have been closed in error in the past. In any case, librpmio.so really should not export its own glob() implementation. It causes odd behaviour like for the testcase from the description where the rpm version of glob is broken (and that setup with /lib and /lib64 being symlinks is the default after usrmove in F17). (In reply to comment #2) > (In reply to comment #1) > > Yup, blasts from the past... > > > > So is glibc glob() now returning dangling symlinks again? If so, when did it > > change? > > No it is not. Right. Would've been shocked to learn otherwise... > See http://sourceware.org/bugzilla/show_bug.cgi?id=866 > But you might want to ask on the bug whether or not it may be reopened, the new > glibc team has been revisiting old bug reports to see if any have been closed > in error in the past. Dunno if its worth the trouble. Even if the behavior got changed one of these days, rpm would still have to support versions with the current behavior for years to come. > In any case, librpmio.so really should not export its own glob() > implementation. No disagreement there, just perhaps mildly surprised to see somebody actually complain about it after all the years its been that way (I've known, intended to fix and forgotten about it at least five times by now :) I'd rather get rid of the internal implementation in the first place but... BTW. Two different solutions to work around the broken glob in librpmio.so for programs linking against it: http://sourceware.org/bugzilla/show_bug.cgi?id=14078 The first allows librpmio to use its own glob, the second just overrides it with the one from glibc. FWIW this has been fixed upstream git master now. For released rpm versions we'd probably want a bit less invasive fix though. Fixed in rawhide now as of rpm >= 4.10.90 (In reply to Panu Matilainen from comment #1) > Yup, blasts from the past... > > So is glibc glob() now returning dangling symlinks again? If so, when did it > change? It changed in glibc 2.27 (Fedora 28), where this bug was fixed: https://sourceware.org/bugzilla/show_bug.cgi?id=866 |