diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-12-02 18:27:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:17 -0500 |
commit | 64b516b10546619d3b1adef7fcc4cfef3ad610f9 (patch) | |
tree | ed55e190612e6c1f2fadf0c16e24b39917197cb2 /source4/libcli/auth/gensec_krb5.c | |
parent | 00948a80724ccfe1454bc40fcfcdc2287b4e3f31 (diff) | |
download | samba-64b516b10546619d3b1adef7fcc4cfef3ad610f9.tar.gz samba-64b516b10546619d3b1adef7fcc4cfef3ad610f9.tar.bz2 samba-64b516b10546619d3b1adef7fcc4cfef3ad610f9.zip |
r4045: readd krb5 support defaulted to disable
use:
gensec:krb5=yes
gensec:ms_krb5=yes
to enable it
or -k on the client tools on the command line
metze
(This used to be commit 0ae5794cf44933d2554e0356baaca24c7a784f71)
Diffstat (limited to 'source4/libcli/auth/gensec_krb5.c')
-rw-r--r-- | source4/libcli/auth/gensec_krb5.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c index 97025fa6c4..0f1bf8e700 100644 --- a/source4/libcli/auth/gensec_krb5.c +++ b/source4/libcli/auth/gensec_krb5.c @@ -512,9 +512,14 @@ static NTSTATUS gensec_krb5_update(struct gensec_security *gensec_security, TALL { char *principal; DATA_BLOB unwrapped_in; - DATA_BLOB unwrapped_out; + DATA_BLOB unwrapped_out = data_blob(NULL, 0); uint8 tok_id[2]; + if (!in.data) { + *out = unwrapped_out; + return NT_STATUS_MORE_PROCESSING_REQUIRED; + } + /* Parse the GSSAPI wrapping, if it's there... (win2k3 allows it to be omited) */ if (!gensec_gssapi_parse_krb5_wrap(out_mem_ctx, &in, &unwrapped_in, tok_id)) { nt_status = ads_verify_ticket(out_mem_ctx, @@ -544,8 +549,11 @@ static NTSTATUS gensec_krb5_update(struct gensec_security *gensec_security, TALL if (NT_STATUS_IS_OK(nt_status)) { gensec_krb5_state->state_position = GENSEC_KRB5_DONE; /* wrap that up in a nice GSS-API wrapping */ +#ifndef GENSEC_SEND_UNWRAPPED_KRB5 *out = gensec_gssapi_gen_krb5_wrap(out_mem_ctx, &unwrapped_out, TOK_ID_KRB_AP_REP); - +#else + *out = unwrapped_out; +#endif gensec_krb5_state->peer_principal = talloc_steal(gensec_krb5_state, principal); } return nt_status; |