mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* misc.c (pull_in_libs): Dead code. Removed.
* sig-check.c (check_revocation_keys): Comments. * getkey.c (merge_selfsigs_main): Don't bother to check designated revoker sigs if the key is already revoked. * packet.h, getkey.c (merge_selfsigs_main): New "maybe_revoked" flag on PKs. It is set when there is a revocation signature from a valid revocation key, but the revocation key is not present to verify the signature. * pkclist.c (check_signatures_trust): Use it here to give a warning when showing key trust. * compress-bz2.c: Include stdio.h. Solaris 9 has a very old bzip2 library and we can at least guarantee that it won't fail because of the lack of stdio.h. * tdbio.c: Fixed format string bugs related to the use of DB_NAME. Reported by Florian Weimer.
This commit is contained in:
parent
f13f772a29
commit
d537d547ce
8 changed files with 67 additions and 45 deletions
20
g10/tdbio.c
20
g10/tdbio.c
|
@ -774,8 +774,7 @@ upd_hashtable( ulong table, byte *key, int keylen, ulong newrecnum )
|
|||
hashrec += msb / ITEMS_PER_HTBL_RECORD;
|
||||
rc = tdbio_read_record( hashrec, &rec, RECTYPE_HTBL );
|
||||
if( rc ) {
|
||||
log_error( db_name, "upd_hashtable: read failed: %s\n",
|
||||
g10_errstr(rc) );
|
||||
log_error("upd_hashtable: read failed: %s\n", g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -784,7 +783,7 @@ upd_hashtable( ulong table, byte *key, int keylen, ulong newrecnum )
|
|||
rec.r.htbl.item[msb % ITEMS_PER_HTBL_RECORD] = newrecnum;
|
||||
rc = tdbio_write_record( &rec );
|
||||
if( rc ) {
|
||||
log_error( db_name, "upd_hashtable: write htbl failed: %s\n",
|
||||
log_error("upd_hashtable: write htbl failed: %s\n",
|
||||
g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
@ -923,7 +922,7 @@ drop_from_hashtable( ulong table, byte *key, int keylen, ulong recnum )
|
|||
hashrec += msb / ITEMS_PER_HTBL_RECORD;
|
||||
rc = tdbio_read_record( hashrec, &rec, RECTYPE_HTBL );
|
||||
if( rc ) {
|
||||
log_error( db_name, "drop_from_hashtable: read failed: %s\n",
|
||||
log_error("drop_from_hashtable: read failed: %s\n",
|
||||
g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
@ -936,7 +935,7 @@ drop_from_hashtable( ulong table, byte *key, int keylen, ulong recnum )
|
|||
rec.r.htbl.item[msb % ITEMS_PER_HTBL_RECORD] = 0;
|
||||
rc = tdbio_write_record( &rec );
|
||||
if( rc )
|
||||
log_error( db_name, "drop_from_hashtable: write htbl failed: %s\n",
|
||||
log_error("drop_from_hashtable: write htbl failed: %s\n",
|
||||
g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
@ -965,7 +964,7 @@ drop_from_hashtable( ulong table, byte *key, int keylen, ulong recnum )
|
|||
rec.r.hlst.rnum[i] = 0; /* drop */
|
||||
rc = tdbio_write_record( &rec );
|
||||
if( rc )
|
||||
log_error( db_name, "drop_from_hashtable: write htbl failed: %s\n",
|
||||
log_error("drop_from_hashtable: write htbl failed: %s\n",
|
||||
g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
@ -1012,7 +1011,7 @@ lookup_hashtable( ulong table, const byte *key, size_t keylen,
|
|||
hashrec += msb / ITEMS_PER_HTBL_RECORD;
|
||||
rc = tdbio_read_record( hashrec, rec, RECTYPE_HTBL );
|
||||
if( rc ) {
|
||||
log_error( db_name, "lookup_hashtable failed: %s\n", g10_errstr(rc) );
|
||||
log_error("lookup_hashtable failed: %s\n", g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -1022,14 +1021,14 @@ lookup_hashtable( ulong table, const byte *key, size_t keylen,
|
|||
|
||||
rc = tdbio_read_record( item, rec, 0 );
|
||||
if( rc ) {
|
||||
log_error( db_name, "hashtable read failed: %s\n", g10_errstr(rc) );
|
||||
log_error( "hashtable read failed: %s\n", g10_errstr(rc) );
|
||||
return rc;
|
||||
}
|
||||
if( rec->rectype == RECTYPE_HTBL ) {
|
||||
hashrec = item;
|
||||
level++;
|
||||
if( level >= keylen ) {
|
||||
log_error( db_name, "hashtable has invalid indirections\n");
|
||||
log_error("hashtable has invalid indirections\n");
|
||||
return G10ERR_TRUSTDB;
|
||||
}
|
||||
goto next_level;
|
||||
|
@ -1621,6 +1620,3 @@ migrate_from_v2 ()
|
|||
log_info ("migrated %d version 2 ownertrusts\n", count);
|
||||
m_free (ottable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue