FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-06-2011, 05:34 PM
Florian Pritz
 
Default signing.c: check if needed files are readable

If we can't read the keyring, gpgme will output confusing debug
information and fail to verify the signature, so we should log some
debug information.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
---
lib/libalpm/signing.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index cfa9a02..b08416f 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -118,6 +118,12 @@ static int init_gpgme(alpm_handle_t *handle)

sigdir = alpm_option_get_gpgdir(handle);

+ if (_alpm_access(handle, sigdir, "pubring.gpg", R_OK)
+ || _alpm_access(handle, sigdir, "trustdb.gpg", R_OK)) {
+ handle->pm_errno = ALPM_ERR_NOT_A_FILE;
+ _alpm_log(handle, ALPM_LOG_DEBUG, "Signature verification will fail!
");
+ }
+
/* calling gpgme_check_version() returns the current version and runs
* some internal library setup code */
version = gpgme_check_version(NULL);
--
1.7.6
 

Thread Tools




All times are GMT. The time now is 02:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org