Bug 1484 - ldconfig creates duplicate symlink in /usr/lib
Summary: ldconfig creates duplicate symlink in /usr/lib
Status: SUSPENDED
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.3.5
: P2 normal
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-15 03:53 UTC by Daniel Jacobowitz
Modified: 2016-05-17 18:28 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Jacobowitz 2005-10-15 03:53:16 UTC
Suppose you've got these libraries (standard on a Debian system):

lrwxrwxrwx  1 root root     17 Aug 22 22:45 /lib/libncurses.so.5 ->
libncurses.so.5.4
-rw-r--r--  1 root root 373480 Jul 17 16:37 /lib/libncurses.so.5.4
lrwxrwxrwx  1 root root     13 Aug 23 18:15 /usr/lib/libtermcap.so -> libncurses.so

Then ldconfig will create, in addition to the /lib symlink above, this symlink:

lrwxrwxrwx  1 root root     13 Oct 14 23:43 /usr/lib/libncurses.so.5 ->
libtermcap.so

That's because it looks at libtermcap.so, sees that it isn't pointing to a file
with SONAME "libtermcap.so<VERSION>", and clears is_link.  So there appears to
be a library in /usr/lib which provides libncurses.so.5, so ldconfig creates the
symlink.

This is not really harmful except to Debian's packaging scripts, which complain
that they can't find a package which provides /usr/lib/libncurses.so.5.  But the
symlink is redundant, and it would be better not to create it.

This message gives some background on the current test:
  http://sourceware.org/ml/libc-alpha/2003-08/msg00120.html

Unfortunately the same thing that's supposed to handle a link named
libc-2.3.2.so also handles a link named libtermcap.so.

We only need a single symlink named "libncurses.so.5" (but for each supported
ELF class / hwcap / et cetera) in all directories ldconfig searches.  But that's
getting a bit too magic.  Is there any way to avoid this excess link?
Comment 1 Andreas Jaeger 2005-12-29 07:44:33 UTC
I do not see a way to avoid this directly but will take the bug.
Comment 2 Andreas Jaeger 2011-09-29 09:35:59 UTC
No proper solution found yet, let's suspend it.
Comment 3 Jackie Rosen 2014-02-16 18:28:15 UTC Comment hidden (spam)