hdb: decorate HDB_entry with context member

Decorate HDB_entry with context and move free_entry callback into HDB structure
itself. Requires updating hdb_free_entry() signature to include HDB parameter.
A follow-up commit will consolidate hdb_entry_ex (which has a single hdb_entry
member) into hdb_entry.
This commit is contained in:
Luke Howard
2022-01-07 12:15:55 +11:00
parent 923067e099
commit c5551775e2
40 changed files with 150 additions and 137 deletions

View File

@@ -767,7 +767,7 @@ LDAP_entry2mods(krb5_context context, HDB * db, hdb_entry_ex * ent,
}
if (msg)
hdb_free_entry(context, &orig);
hdb_free_entry(context, db, &orig);
return ret;
}
@@ -1467,7 +1467,7 @@ out:
free(ntPasswordIN);
if (ret)
hdb_free_entry(context, ent);
hdb_free_entry(context, db, ent);
return ret;
}
@@ -1552,7 +1552,7 @@ LDAP_seq(krb5_context context, HDB * db, unsigned flags, hdb_entry_ex * entry)
if (db->hdb_master_key_set && (flags & HDB_F_DECRYPT)) {
ret = hdb_unseal_keys(context, db, &entry->entry);
if (ret)
hdb_free_entry(context, entry);
hdb_free_entry(context, db, entry);
}
}
@@ -1712,7 +1712,7 @@ LDAP_fetch_kvno(krb5_context context, HDB * db, krb5_const_principal principal,
if (db->hdb_master_key_set && (flags & HDB_F_DECRYPT)) {
ret = hdb_unseal_keys(context, db, &entry->entry);
if (ret)
hdb_free_entry(context, entry);
hdb_free_entry(context, db, entry);
}
}