summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/hdb-ldb.c3
-rw-r--r--source4/kdc/kdc.h1
-rw-r--r--source4/kdc/pac-glue.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index d8877655c9..2143d26cde 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -430,6 +430,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
}
private->entry_ex = entry_ex;
+ private->iconv_convenience = lp_iconv_convenience(lp_ctx);
talloc_set_destructor(private, hdb_ldb_destrutor);
@@ -546,7 +547,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
entry_ex->entry.generation = NULL;
/* Get keys from the db */
- ret = LDB_message2entry_keys(context, lp_iconv_convenience(lp_ctx), private, msg, userAccountControl, entry_ex);
+ ret = LDB_message2entry_keys(context, private->iconv_convenience, private, msg, userAccountControl, entry_ex);
if (ret) {
/* Could be bougus data in the entry, or out of memory */
goto out;
diff --git a/source4/kdc/kdc.h b/source4/kdc/kdc.h
index 9d031b8f7d..78276183c2 100644
--- a/source4/kdc/kdc.h
+++ b/source4/kdc/kdc.h
@@ -51,6 +51,7 @@ struct kdc_server {
struct hdb_ldb_private {
struct ldb_context *samdb;
+ struct smb_iconv_convenience *iconv_convenience;
struct ldb_message *msg;
struct ldb_message *realm_ref_msg;
hdb_entry_ex *entry_ex;
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index 637f39aa74..cf55618a06 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -114,7 +114,6 @@ krb5_error_code samba_kdc_get_pac(void *priv,
struct hdb_ldb_private *private = talloc_get_type(client->ctx, struct hdb_ldb_private);
TALLOC_CTX *mem_ctx = talloc_named(private, 0, "samba_get_pac context");
unsigned int userAccountControl;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
if (!mem_ctx) {
return ENOMEM;
@@ -140,7 +139,7 @@ krb5_error_code samba_kdc_get_pac(void *priv,
return ENOMEM;
}
- ret = make_pac(context, mem_ctx, iconv_convenience, server_info, pac);
+ ret = make_pac(context, mem_ctx, private->iconv_convenience, server_info, pac);
talloc_free(mem_ctx);
return ret;
@@ -166,7 +165,6 @@ krb5_error_code samba_kdc_reget_pac(void *priv, krb5_context context,
struct PAC_LOGON_INFO_CTR logon_info;
union netr_Validation validation;
struct auth_serversupplied_info *server_info_out;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
TALLOC_CTX *mem_ctx = talloc_named(private, 0, "samba_get_pac context");
@@ -193,7 +191,7 @@ krb5_error_code samba_kdc_reget_pac(void *priv, krb5_context context,
return ENOMEM;
}
- ndr_err = ndr_pull_struct_blob(&pac_in, mem_ctx, iconv_convenience, &logon_info,
+ ndr_err = ndr_pull_struct_blob(&pac_in, mem_ctx, private->iconv_convenience, &logon_info,
(ndr_pull_flags_fn_t)ndr_pull_PAC_LOGON_INFO_CTR);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err) || !logon_info.info) {
nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -216,7 +214,7 @@ krb5_error_code samba_kdc_reget_pac(void *priv, krb5_context context,
/* We will compleatly regenerate this pac */
krb5_pac_free(context, *pac);
- ret = make_pac(context, mem_ctx, iconv_convenience, server_info_out, pac);
+ ret = make_pac(context, mem_ctx, private->iconv_convenience, server_info_out, pac);
talloc_free(mem_ctx);
return ret;