summaryrefslogtreecommitdiff
path: root/source4/auth/kerberos
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-02 20:56:26 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:11 +0100
commit120ecdb5cb7dbd7c650f3e9fbcefb925f695e0f2 (patch)
treeb7fa447f3959f84417d58a0b60ca8bb0c8de17b1 /source4/auth/kerberos
parentda0640518f67545df6a1da30c916fbc452d38a39 (diff)
downloadsamba-120ecdb5cb7dbd7c650f3e9fbcefb925f695e0f2.tar.gz
samba-120ecdb5cb7dbd7c650f3e9fbcefb925f695e0f2.tar.bz2
samba-120ecdb5cb7dbd7c650f3e9fbcefb925f695e0f2.zip
r26233: Pass loadparm context when creating krb5 contexts.
(This used to be commit 7780bf285fdfc30f89409d0436bad0d4b6de5cd4)
Diffstat (limited to 'source4/auth/kerberos')
-rw-r--r--source4/auth/kerberos/kerberos.h1
-rw-r--r--source4/auth/kerberos/krb5_init_context.c11
-rw-r--r--source4/auth/kerberos/krb5_init_context.h2
3 files changed, 9 insertions, 5 deletions
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index a3005b5019..f8fb6a4157 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -151,6 +151,7 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
krb5_principal client_principal,
time_t tgs_authtime,
DATA_BLOB *pac);
+struct loadparm_context;
#include "auth/kerberos/proto.h"
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 68e60dcdc5..9bcf8910d5 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -366,6 +366,7 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context,
krb5_error_code smb_krb5_init_context(void *parent_ctx,
struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context)
{
krb5_error_code ret;
@@ -393,7 +394,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx,
talloc_set_destructor(*smb_krb5_context, smb_krb5_context_destroy_1);
- config_file = config_path(tmp_ctx, global_loadparm, "krb5.conf");
+ config_file = config_path(tmp_ctx, lp_ctx, "krb5.conf");
if (!config_file) {
talloc_free(tmp_ctx);
return ENOMEM;
@@ -418,10 +419,10 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx,
return ret;
}
- if (lp_realm(global_loadparm) && *lp_realm(global_loadparm)) {
- char *upper_realm = strupper_talloc(tmp_ctx, lp_realm(global_loadparm));
+ if (lp_realm(lp_ctx) && *lp_realm(lp_ctx)) {
+ char *upper_realm = strupper_talloc(tmp_ctx, lp_realm(lp_ctx));
if (!upper_realm) {
- DEBUG(1,("gensec_krb5_start: could not uppercase realm: %s\n", lp_realm(global_loadparm)));
+ DEBUG(1,("gensec_krb5_start: could not uppercase realm: %s\n", lp_realm(lp_ctx)));
talloc_free(tmp_ctx);
return ENOMEM;
}
@@ -473,7 +474,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx,
/* Set options in kerberos */
krb5_set_dns_canonicalize_hostname((*smb_krb5_context)->krb5_context,
- lp_parm_bool(global_loadparm, NULL, "krb5", "set_dns_canonicalize", false));
+ lp_parm_bool(lp_ctx, NULL, "krb5", "set_dns_canonicalize", false));
return 0;
}
diff --git a/source4/auth/kerberos/krb5_init_context.h b/source4/auth/kerberos/krb5_init_context.h
index 1bad80357a..44771f2aec 100644
--- a/source4/auth/kerberos/krb5_init_context.h
+++ b/source4/auth/kerberos/krb5_init_context.h
@@ -23,7 +23,9 @@ struct smb_krb5_context {
};
struct event_context;
+struct loadparm_context;
krb5_error_code smb_krb5_init_context(void *parent_ctx, struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context);
void smb_krb5_free_context(struct smb_krb5_context *smb_krb5_context);