summaryrefslogtreecommitdiff
path: root/lib/rpmlead.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-08-31 22:39:34 +0000
committerjbj <devnull@localhost>2002-08-31 22:39:34 +0000
commitcc5d229b0e7a13f4d9efac2aed5926a0078df48c (patch)
treeb5a1a608498f322dad0cd9534ccd9da4c121b3a0 /lib/rpmlead.c
parent929d5d38346273dbdaf20e5ceb3b1687405676af (diff)
downloadrpm-cc5d229b0e7a13f4d9efac2aed5926a0078df48c.tar.gz
rpm-cc5d229b0e7a13f4d9efac2aed5926a0078df48c.tar.bz2
rpm-cc5d229b0e7a13f4d9efac2aed5926a0078df48c.zip
Sync with rpm-4.1.
CVS patchset: 5695 CVS date: 2002/08/31 22:39:34
Diffstat (limited to 'lib/rpmlead.c')
-rw-r--r--lib/rpmlead.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rpmlead.c b/lib/rpmlead.c
index 348517856..a679334c3 100644
--- a/lib/rpmlead.c
+++ b/lib/rpmlead.c
@@ -12,6 +12,7 @@
#include <rpmlib.h>
+#include "signature.h"
#include "rpmlead.h"
#include "debug.h"
@@ -59,13 +60,12 @@ rpmRC readLead(FD_t fd, struct rpmlead *lead)
if (memcmp(lead->magic, lead_magic, sizeof(lead_magic)))
return RPMRC_FAIL;
-
lead->type = ntohs(lead->type);
lead->archnum = ntohs(lead->archnum);
lead->osnum = ntohs(lead->osnum);
-
- if (lead->major >= 2)
- lead->signature_type = ntohs(lead->signature_type);
+ lead->signature_type = ntohs(lead->signature_type);
+ if (lead->signature_type != RPMSIGTYPE_HEADERSIG)
+ return RPMRC_FAIL;
return RPMRC_OK;
}