diff options
author | Dan McGee <dan@archlinux.org> | 2011-09-22 22:59:18 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-22 23:01:11 +0200 |
commit | c406949226fe5759473f13b5eb1fcf48c32d67ea (patch) | |
tree | a1759d86858dd672d8756d695952c347fdbf9b86 /lib | |
parent | 1e0ed133f471c35fe6979612a4cb57926223c9b9 (diff) | |
download | pacman-c406949226fe5759473f13b5eb1fcf48c32d67ea.tar.gz pacman-c406949226fe5759473f13b5eb1fcf48c32d67ea.tar.xz |
Ensure database validity flags are set in invalid signature case
We returned the right error code but never set the flags accordingly.
Also, now that we can bail early, ensure we set the error code.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/be_sync.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 5477eff4..4864616b 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -75,6 +75,7 @@ static int sync_db_validate(alpm_db_t *db) return 0; } if(db->status & DB_STATUS_INVALID) { + db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG; return -1; } @@ -117,6 +118,8 @@ static int sync_db_validate(alpm_db_t *db) } while(retry); if(ret) { + db->status &= ~DB_STATUS_VALID; + db->status |= DB_STATUS_INVALID; db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG; return 1; } |