[pacman-dev] [PATCH 3/4] sync.c: remove unnecessary check for PM_PGP_VERIFY_UNKNOWN
Rémy Oudompheng
remyoudompheng at gmail.com
Thu Apr 21 02:38:56 EDT 2011
The value PM_PGP_VERIFY_UNKNOWN is reserved to error cases,
now that the signature verification level defaults to the
globally set level. The only error case is when handle == NULL,
which is false in the context of _alpm_sync_commit().
Signed-off-by: Rémy Oudompheng <remy at archlinux.org>
---
Now I'm unsure about this patch. We could miss the case where sdb is NULL
but then, the log message would do a NULL dereference.
lib/libalpm/sync.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index b6c64af..7958c66 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -851,13 +851,6 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data)
check_sig = _alpm_db_get_sigverify_level(sdb);
- if(check_sig == PM_PGP_VERIFY_UNKNOWN) {
- _alpm_log(PM_LOG_ERROR, _("failed to determine signature verification "
- "level for database: %s\n"), sdb->treename);
- pm_errno = PM_ERR_PKG_INVALID;
- goto error;
- }
-
if(check_sig != PM_PGP_VERIFY_NEVER) {
int ret = _alpm_gpgme_checksig(filepath, pgpsig);
if((check_sig == PM_PGP_VERIFY_ALWAYS && ret != 0) ||
--
1.7.4.4
More information about the pacman-dev
mailing list