You are not logged in.

#1 2010-02-09 20:34:50

aurino
Member
From: berlin, germany
Registered: 2009-03-19
Posts: 4

missing-libs.sh: find ELF files referencing missing libs

http://ino-waiting.gmxhome.de/softwares.html#s17

This script does not use ldd(1), so it isn't vulnerable to related exploits.  It only reads encountered ELF files using readelf(1), parses out the NEEDED and RPATH sections, compares the result to the output of "ldconfig -p" and puts together a report.  It has options to automatically invoke some command (eg. the package manager pacman in our case) and to flag risky RPATHs (containing unsecure paths).

It is also reasonably fast:

$ time missing-libs.sh /bin/ /sbin/ /usr/bin/ /usr/sbin/ /l/bin/ /l/sbin/
lrwxrwxrwx 1 root root 34 Oct 16 18:56 /l/bin/drawtiming -> /opt/drawtiming/_l_/bin/drawtiming
/l/bin/drawtiming: 'libMagick++.so.2' must point to existing file: 'uncached, not existing or missing RPATH!'
/l/bin/drawtiming: 'libMagickCore.so.2' must point to existing file: 'uncached, not existing or missing RPATH!'

real: 4m13.6s   user: 1m37.3s   sys: 2m32.8s

ie. a few minutes without anything cashed, this  is after booting.

Missing-libs.sh is intended for people who have their own locally compiled programs using distribution supplied libraries.  In verbose mode, it lists all libs some lib or program depends on and recursively the libs these libraries depend on, down to libc, weeding out duplicates.

regards, clemens fischer

Offline

#2 2010-02-10 02:25:22

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: missing-libs.sh: find ELF files referencing missing libs

Handy! You might also want to look at the rebuildlist script the devs use, which is like this but run on a repo for specific libraries

Offline

Board footer

Powered by FluxBB