RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmchecksig.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 16 Aug 2007 - 21:04:48 CEST
Message-Id: <20070816190448.D4636348455@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   16-Aug-2007 21:04:48
  Branch: HEAD                             Handle: 2007081620044800

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmchecksig.c

  Log:
    - no-operation code paths for --nolead --nosigh packages.

  Summary:
    Revision    Changes     Path
    1.1577      +1  -0      rpm/CHANGES
    1.127       +9  -2      rpm/lib/rpmchecksig.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1576 -r1.1577 CHANGES
  --- rpm/CHANGES	16 Aug 2007 18:36:04 -0000	1.1576
  +++ rpm/CHANGES	16 Aug 2007 19:04:48 -0000	1.1577
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: no-operation code paths for --nolead --nosigh packages.
       - jbj: functional sign/verify on --nolead packages.
       - jbj: add rpmkey, a keyctl(1) clone.
       - jbj: disable RPMv3 RSA/DSA signing.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.126 -r1.127 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	16 Aug 2007 18:36:04 -0000	1.126
  +++ rpm/lib/rpmchecksig.c	16 Aug 2007 19:04:48 -0000	1.127
  @@ -294,6 +294,7 @@
   	    nh = headerFree(nh);
   	}
   
  +if (sigh != NULL) {
   	/* Eliminate broken digest values. */
   	xx = headerRemoveEntry(sigh, RPMSIGTAG_LEMD5_1);
   	xx = headerRemoveEntry(sigh, RPMSIGTAG_LEMD5_2);
  @@ -376,6 +377,7 @@
   	sigh = headerReload(sigh, RPMTAG_HEADERSIGNATURES);
   	if (sigh == NULL)	/* XXX can't happen */
   	    goto exit;
  +}
   
   	/* Write the lead/signature of the output rpm */
   /*@-boundswrite@*/
  @@ -778,7 +780,7 @@
       pgpDigParams sigp;
       int_32 siglen;
       Header sigh = NULL;
  -    HeaderIterator hi;
  +    HeaderIterator hi = NULL;
       const char * msg;
       int res = 0;
       int xx;
  @@ -830,6 +832,9 @@
   	    /*@switchbreak@*/ break;
   	}
   	msg = _free(msg);
  +} else {
  +nosignatures = 1;
  +nodigests = 1;
   }
   
   	/* Grab a hint of what needs doing to avoid duplication. */
  @@ -903,6 +908,7 @@
   	sprintf(b, "%s:%c", fn, (rpmIsVerbose() ? '\n' : ' ') );
   	b += strlen(b);
   
  +	if (sigh)
   	for (hi = headerInitIterator(sigh);
   	    headerNextIterator(hi, &sigtag, &sigtype, &sig, &siglen) != 0;
   	    (void) rpmtsSetSig(ts, sigtag, sigtype, NULL, siglen))
  @@ -1109,7 +1115,8 @@
   	    }
   /*@=bounds@*/
   	}
  -	hi = headerFreeIterator(hi);
  +	if (hi)
  +	    hi = headerFreeIterator(hi);
   
   	res += res2;
   
  @@ .
Received on Thu Aug 16 21:04:48 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.