Skip to content

Commit

Permalink
Ensure gpg-pubkey packages not having OS and ARCH
Browse files Browse the repository at this point in the history
As those are special make sure that actually are and did not get
installed as a normal rpm package - whihc do noot ARCH and OS set.
  • Loading branch information
ffesti committed Nov 29, 2024
1 parent 5954bac commit 01921c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/keystore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ rpmRC keystore_rpmdb::load_keys(rpmtxn txn, rpmKeyring keyring)
struct rpmtd_s pubkeys;
const char *key;

/* don't allow regularly installed gpg-pubkey packages */
if (headerIsEntry(h, RPMTAG_ARCH) || headerIsEntry(h, RPMTAG_OS)) {
continue;
}

if (!headerGet(h, RPMTAG_PUBKEYS, &pubkeys, HEADERGET_MINMEM))
continue;

Expand Down

0 comments on commit 01921c7

Please sign in to comment.