From owner-freebsd-security Wed Jun 26 20:39:56 2002 Delivered-To: freebsd-security@freebsd.org Received: from pcp01360967pcs.jamisn01.pa.comcast.net (pcp01360967pcs.jamisn01.pa.comcast.net [68.80.217.72]) by hub.freebsd.org (Postfix) with ESMTP id 70B3C37B40A for ; Wed, 26 Jun 2002 20:35:50 -0700 (PDT) Received: from pcp01360967pcs.jamisn01.pa.comcast.net (k8vkz8l48o4srh39@localhost [127.0.0.1]) by pcp01360967pcs.jamisn01.pa.comcast.net (8.12.3/8.12.3) with ESMTP id g5R3ZveY018702; Wed, 26 Jun 2002 23:35:57 -0400 (EDT) (envelope-from kway@pcp01360967pcs.jamisn01.pa.comcast.net) Received: (from kway@localhost) by pcp01360967pcs.jamisn01.pa.comcast.net (8.12.4/8.12.4/Submit) id g5R3YfVl008506; Wed, 26 Jun 2002 23:34:41 -0400 (EDT) Date: Wed, 26 Jun 2002 23:34:41 -0400 From: Kevin Way To: Brian Behlendorf Cc: freebsd-security@freebsd.org Subject: Re: FreeBSD Security Advisory FreeBSD-SA-02:28.resolv Message-ID: <20020627033441.GA99268@overtone.org> References: <20020626152851.Q310-100000@yez.hyperreal.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020626152851.Q310-100000@yez.hyperreal.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 26, 2002 at 03:29:45PM -0700, Brian Behlendorf wrote: > Sorry for the newbie question here, but is there a way to programmatically > determine which binaries on a system static-linked libc? I tried "nm" but > that needs non-stripped executables... quick, dirty, evil, and maybe even effective? -Kevin Way #!/usr/local/bin/bash function dir_walk() { for test in $1/* do if [ $test = '.' -o $test = '..' ] then break elif [ -d $test ] then dir_walk $test else do_something $test fi done } function do_something() { if file $1 | grep 'statically linked' > /dev/null 2>&1 then echo "well shit, $1 is statically linked" fi } dir_walk / To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message