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:
@@ -61,6 +61,7 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
heim_idata rep = { 0, NULL };
|
||||
krb5_context context = ctx;
|
||||
hdb_entry_ex *user = NULL;
|
||||
HDB *db = NULL;
|
||||
Key *key = NULL;
|
||||
NTLMReply ntp;
|
||||
size_t size;
|
||||
@@ -113,7 +114,7 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
krb5_principal_set_type(context, client, KRB5_NT_NTLM);
|
||||
|
||||
ret = _kdc_db_fetch(context, config, client,
|
||||
HDB_F_GET_CLIENT, NULL, NULL, &user);
|
||||
HDB_F_GET_CLIENT, NULL, &db, &user);
|
||||
krb5_free_principal(context, client);
|
||||
if (ret)
|
||||
goto failed;
|
||||
@@ -213,7 +214,7 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
|
||||
free_NTLMRequest2(&ntq);
|
||||
if (user)
|
||||
_kdc_free_ent (context, user);
|
||||
_kdc_free_ent (context, db, user);
|
||||
}
|
||||
|
||||
static int help_flag;
|
||||
|
Reference in New Issue
Block a user