@pmatilai commented on this pull request.


>  {
     rpmPubkey *subkeys = NULL;
     pgpDigParams *pgpsubkeys = NULL;
     int pgpsubkeysCount = 0;
     int i;
 
-    if (mainkey && !pgpPrtParamsSubkeys(mainkey->pkt.data(), 
mainkey->pkt.size(),
-                       mainkey->pgpkey, &pgpsubkeys, &pgpsubkeysCount)) {
+    wrlock lock(primarykey->mutex);
+
+    if (primarykey && !pgpPrtParamsSubkeys(primarykey->pkt.data(), 
primarykey->pkt.size(),

Indeed, this function doesn't make a whole lot of sense to begin with, 
rpmKeyringAddKey() should just do this without requiring all users go through 
this dance.

Which makes the scope ever that bigger - I would say just drop the Subkeys 
locking part from this PR - it was always broken and clearly could use some 
sanity instead of locking.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3321#discussion_r1782651004
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3321/review/2340009...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to