Skip to Content.
Sympa Menu

sm-grimoire - Re: [SM-Grimoire]OpenSSH trojan....

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: Mads Laursen <dossen+sgl AT daimi.au.dk>
  • To: sm-grimoire AT lists.ibiblio.org
  • Subject: Re: [SM-Grimoire]OpenSSH trojan....
  • Date: Mon, 5 Aug 2002 22:56:35 +0200

On 05/08/02 11.17, Casey Harkins wrote:
>
>
> On Mon, 5 Aug 2002, Julian v. Bock wrote:
> > AS> On Fri, Aug 02, 2002 at 04:23:02PM -0500, Casey Harkins wrote:
> > >> Aren't MD5's supposed to be of the tar file and not the gzipped
> > >> file?
> > >>
> > >> -casey
> >
> > AS> it says in the wiki that you just run the md5sum of the tarball
> > AS> when you are writing a new spell, which leads me to believe that
> > AS> sorcery just checks it against $SOURCE I could be wrong though
> >
> > Sorcery does not check anything. It is not yet implemented. I hope
> > that we are going to check the .tar checksum since this is going to
> > save us some trouble, but I didn't receive a definite answer from the
> > sorcery team despite asking several times.
> >
>
> This is definitely something that needs to be resolved before checking
> gets implemented. All of the spells I've submitted have the md5sum of the
> .tar, not the compressed tar.
>
How about implementing it in the same way as unpacking, something like
this patch to subrutines (warning: untested code).

That way all that is needed is a script sourcing subrutines and
applying the compute_md5sum to its arguments (for the gurus), and of
cause a comparison in cast.

This also handles the case of zip and rpm files, and allows for easy
expansion to more formats.

/dossen


--- subroutines.old 2002-08-05 22:38:41.000000000 +0200
+++ subroutines 2002-08-05 22:44:30.000000000 +0200
@@ -187,6 +187,25 @@
}


+compute_md5sum() {
+
+ FILENAME=`guess_filename $SOURCE_CACHE/$1` &&
+ echo "Running compute_md5sum() on $FILENAME" >> $DEBUG &&
+ COMPRESSOR=`$FILEPROG -b $FILENAME | cut -d ' ' -f1` &&
+ echo "Compressor guessed to be $COMPRESSOR" >> $DEBUG &&
+
+ case $COMPRESSOR in
+ bzip2) bzip2 -cdf $FILENAME | md5sum - | cut -d" " -f1 ;;
+ gzip) gzip -cdf $FILENAME | md5sum - | cut -d" " -f1 ;;
+ compress*) gzip -cdf $FILENAME | md5sum - | cut -d" " -f1 ;;
+ Zip) md5sum $FILENAME | cut -d" " -f1 ;;
+ RPM) rpmunpack < $FILENAME | md5sum - | cut -d" " -f1 ;;
+ *) false ;;
+ esac
+
+}
+
+
boost_locked() {

[ -f $BOOST_LOCK ] &&




Archive powered by MHonArc 2.6.24.

Top of Page