From bbde5b6a2f85f22110d6840857eaceb6b923c1b4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 13 Apr 2007 05:37:08 +0000 Subject: [PATCH] r22208: Print the target principal name, to help with kdc unreachable errors. Andrew Bartlett --- source/auth/gensec/gensec_gssapi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/auth/gensec/gensec_gssapi.c b/source/auth/gensec/gensec_gssapi.c index a59aa8a07c1..11f94b77083 100644 --- a/source/auth/gensec/gensec_gssapi.c +++ b/source/auth/gensec/gensec_gssapi.c @@ -320,20 +320,17 @@ static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_securi principal = gensec_get_target_principal(gensec_security); if (principal && lp_client_use_spnego_principal()) { - name_token.value = discard_const_p(uint8_t, principal); - name_token.length = strlen(principal); - name_type = GSS_C_NULL_OID; } else { principal = talloc_asprintf(gensec_gssapi_state, "%s@%s", gensec_get_target_service(gensec_security), hostname); - name_token.value = discard_const_p(uint8_t, principal); - name_token.length = strlen(principal); - name_type = GSS_C_NT_HOSTBASED_SERVICE; } + name_token.value = discard_const_p(uint8_t, principal); + name_token.length = strlen(principal); + maj_stat = gss_import_name (&min_stat, &name_token, @@ -351,7 +348,7 @@ static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_securi case 0: break; case KRB5_KDC_UNREACH: - DEBUG(3, ("Cannot reach a KDC we require\n")); + DEBUG(3, ("Cannot reach a KDC we require to contact %s\n", principal)); return NT_STATUS_INVALID_PARAMETER; /* Make SPNEGO ignore us, we can't go any further here */ default: DEBUG(1, ("Aquiring initiator credentails failed\n")); -- 2.11.4.GIT