summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-04-03 20:43:00 +0200
committerWerner Koch <wk@gnupg.org>2007-04-03 20:43:00 +0200
commit61bcf36235dedc6f1ec8b8dfc7b668d923d962c1 (patch)
tree37820eb7c78d5b8f7c78440691bd2ed6bae1a860 /agent
parentAdd a way to get a listing of available CCID readers. (diff)
downloadgnupg2-61bcf36235dedc6f1ec8b8dfc7b668d923d962c1.tar.xz
gnupg2-61bcf36235dedc6f1ec8b8dfc7b668d923d962c1.zip
* trustlist.c (read_trustfiles): Take a missing trustlist as an
empty one.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog5
-rw-r--r--agent/trustlist.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index ea0fbe6e5..aa48c1ebc 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-03 Werner Koch <wk@g10code.com>
+
+ * trustlist.c (read_trustfiles): Take a missing trustlist as an
+ empty one.
+
2007-03-20 Werner Koch <wk@g10code.com>
* protect-tool.c: New option --p12-charset.
diff --git a/agent/trustlist.c b/agent/trustlist.c
index 9678ddab2..b5bafa9cb 100644
--- a/agent/trustlist.c
+++ b/agent/trustlist.c
@@ -275,7 +275,7 @@ read_one_trustfile (const char *fname, int allow_include,
}
-/* Read the trust files and update the global table on success. */
+/* Read the trust files and update the global table on success. */
static gpg_error_t
read_trustfiles (void)
{
@@ -313,6 +313,16 @@ read_trustfiles (void)
if (err)
{
xfree (table);
+ if (gpg_err_code (err) == GPG_ERR_ENOENT)
+ {
+ /* Take a missing trustlist as an empty one. */
+ lock_trusttable ();
+ xfree (trusttable);
+ trusttable = NULL;
+ trusttablesize = 0;
+ unlock_trusttable ();
+ err = 0;
+ }
return err;
}