hdb/hdb-mitdb: Nix unused variable key_data in mdb_seq.

key_data is unused.  Presumably this was copypasta from DB_seq in
hdb/db.c, where it is used for the Heimdal database format in which
the value may be missing a principal but it can be recovered from the
key.  In contrast, the mit-krb5 format appears to always store the
principal in the value and _hdb_mdb_value2entry always retrieves it,
with no need for a key2principal fallback.

fix https://github.com/heimdal/heimdal/issues/1102
This commit is contained in:
Taylor R Campbell
2023-05-27 10:36:35 +00:00
committed by Nico Williams
parent 1d2233f907
commit e3e271ff70

View File

@@ -769,7 +769,7 @@ mdb_seq(krb5_context context, HDB *db,
{
DB *d = (DB*)db->hdb_db;
DBT key, value;
krb5_data key_data, data;
krb5_data data;
int code;
code = db->hdb_lock(context, db, HDB_RLOCK);
@@ -790,8 +790,6 @@ mdb_seq(krb5_context context, HDB *db,
return HDB_ERR_NOENTRY;
}
key_data.data = key.data;
key_data.length = key.size;
data.data = value.data;
data.length = value.size;
memset(entry, 0, sizeof(*entry));