diff options
author | Simo Sorce <idra@samba.org> | 2012-04-25 10:31:12 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2012-05-04 16:51:28 +0200 |
commit | aa1a0d80de8b8c9116f5d5b576e2422d104e6b75 (patch) | |
tree | f30bdc0fe85c5dbeb2e6fe15ff8e49f406687575 /source4/auth/kerberos | |
parent | 9a585a314142637a0c15f04289fea2bc16d3295d (diff) | |
download | samba-aa1a0d80de8b8c9116f5d5b576e2422d104e6b75.tar.gz |
krb-init: define out heimdal specific stuff in mitkrb build
Diffstat (limited to 'source4/auth/kerberos')
-rw-r--r-- | source4/auth/kerberos/krb5_init_context.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c index 948f6870a41..9b36ee94f4a 100644 --- a/source4/auth/kerberos/krb5_init_context.c +++ b/source4/auth/kerberos/krb5_init_context.c @@ -47,8 +47,9 @@ struct smb_krb5_socket { struct packet_context *packet; size_t partial_read; - +#ifdef SAMBA4_USES_HEIMDAL krb5_krbhst_info *hi; +#endif }; static krb5_error_code smb_krb5_context_destroy(struct smb_krb5_context *ctx) @@ -68,10 +69,12 @@ static krb5_error_code smb_krb5_context_destroy(struct smb_krb5_context *ctx) return 0; } +#ifdef SAMBA4_USES_HEIMDAL /* We never close down the DEBUG system, and no need to unreference the use */ static void smb_krb5_debug_close(void *private_data) { return; } +#endif #ifdef SAMBA4_USES_HEIMDAL static void smb_krb5_debug_wrapper(const char *timestr, const char *msg, void *private_data) @@ -421,8 +424,10 @@ smb_krb5_init_context_basic(TALLOC_CTX *tmp_ctx, krb5_context *_krb5_context) { krb5_error_code ret; +#ifdef SAMBA4_USES_HEIMDAL char **config_files; const char *config_file, *realm; +#endif krb5_context krb5_ctx; initialize_krb5_error_table(); @@ -434,6 +439,10 @@ smb_krb5_init_context_basic(TALLOC_CTX *tmp_ctx, return ret; } + /* The MIT Kerberos build relies on using the system krb5.conf file. + * If you really want to use another file please set KRB5_CONFIG + * accordingly. */ +#ifdef SAMBA4_USES_HEIMDAL config_file = lpcfg_config_path(tmp_ctx, lp_ctx, "krb5.conf"); if (!config_file) { krb5_free_context(krb5_ctx); @@ -468,7 +477,7 @@ smb_krb5_init_context_basic(TALLOC_CTX *tmp_ctx, return ret; } } - +#endif *_krb5_context = krb5_ctx; return 0; } @@ -548,7 +557,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx, #else ret = krb5_set_trace_callback(kctx, smb_krb5_debug_wrapper, NULL); if (ret && ret != KRB5_TRACE_NOSUPP) { - DEBUG(1, ("krb5_set_trace_callback failed (%s)\n" + DEBUG(1, ("krb5_set_trace_callback failed (%s)\n", smb_get_krb5_error_message(kctx, ret, tmp_ctx))); talloc_free(tmp_ctx); return ret; |