summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/gensec_krb5.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-07-29 10:33:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:44 -0500
commit188a8014ea77e8d03916da8b6bc103bc49086155 (patch)
tree592727abcbe3fab36a0ff2d00e7186d5348d9d19 /source4/libcli/auth/gensec_krb5.c
parentf1a215f5cb174a0bfe50f288fbd998c8fabb0b63 (diff)
downloadsamba-188a8014ea77e8d03916da8b6bc103bc49086155.tar.gz
samba-188a8014ea77e8d03916da8b6bc103bc49086155.tar.bz2
samba-188a8014ea77e8d03916da8b6bc103bc49086155.zip
r1605: GENSEC krb5 updates - fix a valgrind found uninitialised variable, and
allow tests for 'unwrapped' krb5, allowed by Win2k3. SPENGO changes, trying to get the logic right (when and what sub-mechanisms to wrap). Andrew Bartlett (This used to be commit 8a0f7bf5e282d021afe93994a91fd76fa9c05f42)
Diffstat (limited to 'source4/libcli/auth/gensec_krb5.c')
-rw-r--r--source4/libcli/auth/gensec_krb5.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index c7c1a18d24..f5f02d1421 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -187,7 +187,7 @@ static NTSTATUS gensec_krb5_client_start(struct gensec_security *gensec_security
case KRB5_CC_NOTFOUND:
{
char *password;
- time_t kdc_time;
+ time_t kdc_time = 0;
nt_status = gensec_get_password(gensec_security,
gensec_security->mem_ctx,
&password);
@@ -284,11 +284,15 @@ static NTSTATUS gensec_krb5_update(struct gensec_security *gensec_security, TALL
nt_status = NT_STATUS_LOGON_FAILURE;
} else {
DATA_BLOB unwrapped_out;
+
+#ifndef GENSEC_SEND_UNWRAPPED_KRB5 /* This should be a switch for the torture code to set */
unwrapped_out = data_blob_talloc(out_mem_ctx, gensec_krb5_state->ticket.data, gensec_krb5_state->ticket.length);
/* wrap that up in a nice GSS-API wrapping */
*out = gensec_gssapi_gen_krb5_wrap(out_mem_ctx, &unwrapped_out, TOK_ID_KRB_AP_REQ);
-
+#else
+ *out = data_blob_talloc(out_mem_ctx, gensec_krb5_state->ticket.data, gensec_krb5_state->ticket.length);
+#endif
gensec_krb5_state->state_position = GENSEC_KRB5_CLIENT_MUTUAL_AUTH;
nt_status = NT_STATUS_MORE_PROCESSING_REQUIRED;
}