Skip to content

Commit b3449a0

Browse files
dralleypmatilai
authored andcommitted
Remove lead checks other than the "magic number" check
Remove checks on the lead's "signature type" and "rpm package format version" fields. The lead is a long, long obsolete structure and the less we look at it the better, these checks accomplish exactly nothing at all. Fixes: #2423
1 parent c97fd93 commit b3449a0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/rpmlead.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,8 @@ rpmRC rpmLeadWrite(FD_t fd, Header h)
9292
static rpmRC rpmLeadCheck(struct rpmlead_s *lead, char **msg)
9393
{
9494
if (memcmp(lead->magic, lead_magic, sizeof(lead_magic))) {
95-
*msg = xstrdup(_("not an rpm package"));
96-
return RPMRC_NOTFOUND;
97-
}
98-
if (lead->signature_type != RPMSIGTYPE_HEADERSIG) {
99-
*msg = xstrdup(_("illegal signature type"));
100-
return RPMRC_FAIL;
101-
}
102-
if (lead->major < 3 || lead->major > 4) {
103-
*msg = xstrdup(_("unsupported RPM package version"));
104-
return RPMRC_FAIL;
95+
*msg = xstrdup(_("not an rpm package"));
96+
return RPMRC_NOTFOUND;
10597
}
10698
return RPMRC_OK;
10799
}

0 commit comments

Comments
 (0)