Differentiate between non-existent and invalid region tag
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 18 Jan 2012 08:56:35 +0000 (10:56 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 3 Apr 2012 12:46:42 +0000 (15:46 +0300)
commitf23998251992b8ae25faf5113c42fee2c49c7f29
tree96b0f17c8414a7476b75ae12ba9342a3e5fa1e04
parente4eab2bc6d07cfd33f740071de7ddbb2fe2f4190
Differentiate between non-existent and invalid region tag

- Non-existent region tag is very different from existing but invalid
  one - the former is not an error but the latter one is, and needs
  to be handled as such. Previously an invalid region tag would cause
  us to treat it like rpm v3 package on entry, skipping all the region
  sanity checks and then crashing and burning later on when the immutable
  tag is fetched.
- Refer to REGION_TAG_TYPE instead of RPM_BIN_TYPE wrt the expected
  type of region tag for consistency and clarity, they are the same
  exact thing though.
- Should unify these damn copy-slop check one of these days, sigh...
  For now, settling for the easily backportable approach.
- Fixes the other half of CVE-2012-0060
lib/package.c
lib/signature.c