[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#3066: a.out binaries in various packages



On Mon, 20 May 1996, Michael Meskes wrote:

> Craig Sanders writes:
> > My semi-automated a.out binary checker has detected that the
> > following packages installed on my system contain a.out binaries:
>
> How do you check them? Do you have a script? If so would you mail it
> to me?

This isn't the script i used yesterday, it's one that works properly :-)

---cut here---
#! /bin/sh
# 1996-05-21  Craig Sanders <cas@taz.net.au>
# this script is public domain.

tmpdir=/tmp/a.out-status
reportfile=$tmpdir/aout-report.txt

fields="^package:\|^version:\|^maintainer:\|^section:"

# make the $tmpdir
mkdir -p $tmpdir

# clean out anything left from a previous run
rm -f $tmpdir/*


# scan through the .list files
for i in `ls -1 /var/lib/dpkg/info/*.list` ; do
  if [ -s $i ] ; then
    echo searching for a.out binaries in $i...
    pkg=`basename $i .list`
    dpkg --status $pkg | grep -i "$fields" > $tmpdir/.tmp
    file `cat $i` | grep MAGIC >> $tmpdir/.tmp && \
	  mv $tmpdir/.tmp $tmpdir/$pkg.aout
  fi
done

# now create the report
cat <<EOF >$reportfile.1
The following packages installed on `hostname` have been found to contain
a.out binaries.

EOF
pkgslist=""
for i in $tmpdir/*.aout ; do
  pkgslist="$pkgslist `basename $i .aout`"
  echo
  echo -------------------
  echo
  cat $i
done >>$reportfile.2
dpkg -l $pkgslist >>$reportfile.1
echo >>$reportfile.1
echo details follow: >>$reportfile.1
echo >>$reportfile.1
cat $reportfile.1 $reportfile.2 >$reportfile

# clean up
rm -f $reportfile.1 $reportfile.2
rm -f $tmpdir/.tmp
rm -f $tmpdir/*.aout
---cut here---


Craig


Reply to: