TALLOC_CTX *tmp_ctx;
DATA_BLOB *pac_blob;
NTSTATUS nt_status;
+ struct samba_kdc_entry *skdc_entry;
+
+ skdc_entry = talloc_get_type_abort(client->ctx,
+ struct samba_kdc_entry);
tmp_ctx = talloc_named(ctx, 0, "mit_samba_get_pac_data context");
if (!tmp_ctx) {
return ENOMEM;
}
- nt_status = samba_kdc_get_pac_blob(tmp_ctx, client, &pac_blob);
+ nt_status = samba_kdc_get_pac_blob(tmp_ctx, skdc_entry, &pac_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(tmp_ctx);
return EINVAL;
}
NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
- struct hdb_entry_ex *client,
+ struct samba_kdc_entry *p,
DATA_BLOB **_pac_blob)
{
- struct samba_kdc_entry *p = talloc_get_type(client->ctx, struct samba_kdc_entry);
struct auth_user_info_dc *user_info_dc;
DATA_BLOB *pac_blob;
NTSTATUS nt_status;
int samba_krbtgt_is_in_db(struct hdb_entry_ex *princ, bool *is_in_db, bool *is_untrusted);
NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
- struct hdb_entry_ex *client,
+ struct samba_kdc_entry *skdc_entry,
DATA_BLOB **_pac_blob);
NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
DATA_BLOB *pac_blob;
krb5_error_code ret;
NTSTATUS nt_status;
+ struct samba_kdc_entry *skdc_entry =
+ talloc_get_type_abort(client->ctx,
+ struct samba_kdc_entry);
mem_ctx = talloc_named(client->ctx, 0, "samba_get_pac context");
if (!mem_ctx) {
return ENOMEM;
}
- nt_status = samba_kdc_get_pac_blob(mem_ctx, client, &pac_blob);
+ nt_status = samba_kdc_get_pac_blob(mem_ctx, skdc_entry, &pac_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
return EINVAL;
struct hdb_entry_ex *krbtgt,
krb5_pac *pac)
{
- struct samba_kdc_entry *p = talloc_get_type(server->ctx, struct samba_kdc_entry);
+ struct samba_kdc_entry *p =
+ talloc_get_type_abort(server->ctx,
+ struct samba_kdc_entry);
TALLOC_CTX *mem_ctx = talloc_named(p, 0, "samba_kdc_reget_pac context");
DATA_BLOB *pac_blob;
DATA_BLOB *deleg_blob = NULL;
}
if (is_untrusted) {
+ struct samba_kdc_entry *client_skdc_entry = NULL;
+
if (client == NULL) {
return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
}
- nt_status = samba_kdc_get_pac_blob(mem_ctx, client, &pac_blob);
+
+ client_skdc_entry = talloc_get_type_abort(client->ctx,
+ struct samba_kdc_entry);
+
+ nt_status = samba_kdc_get_pac_blob(mem_ctx, client_skdc_entry, &pac_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
return EINVAL;