You are not logged in.
This is very simple script and wont chek binaries in directories other than the basic bin sbin usr/bin and usr/sbin.
But it bight be usefull if you have lots of svn and git packages installed.
here it is:
#!/bin/bash
tmp=""
pkgs=""
for i in {,/usr}/{,s}bin/* /usr/lib/* ; do
echo $i
tmp=`readelf -d $i | grep -P '(libssl.so.0.9.8|libcrypto.so.0.9.8)'`
if [ "$tmp" == "" ]; then
echo clean
else
pkgs=$pkgs" "`pacman -Qo $i | awk '{ print $5 }'`
echo "Old version of ssl found adding to package list."
fi
done
echo "Here is list of packages that have binaries that use old version of openssl"
echo $pkgsBugs: Does not search dirs rescursively
output list can contain duplicate entrys
Last edited by Huulivoide (2010-04-11 15:08:51)
Offline
You really should check /usr/lib too.
Offline
Now checks for libraries too, itotally forgot that. but still it wont check from sub dirs, im not good enought to do it.
Offline
and you should use readelf -d instead of ldd which shows deps recursively.
Offline
Huulivoide,
Nice.
tmp=`readefl -d $i | grep libssl.so.0.9.8`should be:
tmp=`readelf -d $i | grep libssl.so.0.9.8`(readefl --> readelf)
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
You should also scan for libcrypto.so.0.9.8
Offline
My recursive one liner version
find {,/usr}/{,s}bin/ /usr/lib/ -type f -printf \~%p -exec readelf -d \{\} \; 2>/dev/null | awk '/libssl.so.0.9.8|libcrypto.so.0.9.8/{print$1}' RS="~" FS="\n"If your as lazy as me though this isn't enough so here's one that finds the offending packages in pacman
find {,/usr}/{,s}bin/ /usr/lib/ -type f -printf \~%p -exec readelf -d \{\} \; 2>/dev/null | awk '/libssl.so.0.9.8|libcrypto.so.0.9.8/{system("pacman -Qo "$1)}' RS="~" FS="\n"And then update them! ![]()
yaourt -Sy $(find {,/usr}/{,s}bin/ /usr/lib/ -type f -printf \~%p -exec readelf -d \{\} \; 2>/dev/null | awk '/libssl.so.0.9.8|libcrypto.so.0.9.8/{system("pacman -Qqo "$1)}' RS="~" FS="\n" | sort | uniq)Offline