diff --git a/lib/keystore.cc b/lib/keystore.cc index a64ef07d6a..b8f0c55e5a 100644 --- a/lib/keystore.cc +++ b/lib/keystore.cc @@ -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;