FreeBSD Security Advisory FreeBSD-SA-03:08.realpath

Jez Hancock jez.hancock at munk.nu
Mon Aug 4 07:59:16 PDT 2003


On Mon, Aug 04, 2003 at 10:10:52AM +0100, Chris Howells wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> On Monday 04 August 2003 08:54, Colin Percival wrote:
> > ? ?Affected applications which were statically linked to the vulnerable
> > code would still need to be recompiled.
> 
> I'm just trying to work out which applications on my system are statically
> linked or not. Is using ldd the best (well, quickest I suppose) way?:
I've just used this:


#!/bin/sh
cd /var/db/pkg
for port in `ls -1d *`
do
	info=`pkg_info -L $port`
	files=`echo $info | cut -f3 -d:`
	for file in $files
	do
		if [ -x $file ]; then
			linked=`file $file | grep "statically linked"`
			if [ -n "$linked" ];then
				echo "$port contains statically linked files ($file)"
				break 
			fi
		fi
	done
done

seems to do the trick ok :)

-- 
Jez

http://www.munk.nu/


More information about the freebsd-security mailing list