diff options
author | ewt <devnull@localhost> | 1996-07-10 19:50:46 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1996-07-10 19:50:46 +0000 |
commit | 64fcd73d5738ffee0f05157c431220d489087803 (patch) | |
tree | dcfea0ac6b30a45ccb63fe494a2acb2bd3470fe6 /lib | |
parent | 11931fd81b0f2f0b0a549b7ec04d26b174dc8e1f (diff) | |
download | rpm-64fcd73d5738ffee0f05157c431220d489087803.tar.gz rpm-64fcd73d5738ffee0f05157c431220d489087803.tar.bz2 rpm-64fcd73d5738ffee0f05157c431220d489087803.zip |
check package version numbers for source packages
CVS patchset: 775
CVS date: 1996/07/10 19:50:46
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/package.c b/lib/package.c index 7cc724f0a..210fe75a1 100644 --- a/lib/package.c +++ b/lib/package.c @@ -52,14 +52,18 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) { NULL <gulp> */ *hdr = NULL; - } else { + } else if (lead.major == 2 || lead.major == 3) { if (readSignature(fd, NULL, lead.signature_type)) { return 2; } *hdr = readHeader(fd, (lead.major >= 3) ? HEADER_MAGIC : NO_HEADER_MAGIC); if (! *hdr) return 2; - } + } else { + error(RPMERR_NEWPACKAGE, "only packages with major numbers <= 2 are" + " supported by this version of RPM"); + return 2; + } } else { if (lead.major == 1) { readOldHeader(fd, hdr, isSource); |