Home GnuPG
Diffusion GnuPG 0f02fba19df1

agent: Fix deadlock in trustlist due to the switch to npth.
0f02fba19df1Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

agent: Fix deadlock in trustlist due to the switch to npth.

* agent/trustlist.c (clear_trusttable): New.
(agent_reload_trustlist): Use new function.
(read_trustfiles): Require to be called with lock held.
(agent_istrusted): Factor all code out to ...
(istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
(agent_marktrusted): Replace calls to agent_reload_trustlist by
explicit code.

In contrast to pth, npth does not use recursive mutexes by default.
However, the code in trustlist.c assumed recursive locks and thus we
had to rework it.

Details

Provenance
wernerAuthored on Apr 30 2012, 2:37 PM
Parents
rG8d7522837c6d: make DNS and URI fields work in gpgsm --gen-key.
Branches
Unknown
Tags
Unknown

Event Timeline