summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-05-08 16:27:57 +0200
committerKarolin Seeger <kseeger@samba.org>2019-05-16 10:37:55 +0000
commit4f0a4fac3de770cc303abdfe48e44f1d42ea6858 (patch)
tree380b71d1eda9de52d5bcb73f27cd3d22f6ab0d3d
parent8542379bde8e48d25bab820c37eef0aafc2f6472 (diff)
downloadsamba-4f0a4fac3de770cc303abdfe48e44f1d42ea6858.tar.gz
s4:auth: Fix debug statement in gensec_gssapi
The 'role' is set to null, we should first set it to the correct value before printing anything. Found by GCC 9. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13937 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit bd29f3fcc023d00afde8e9cc2f9db22dcae49877)
-rw-r--r--source4/auth/gensec/gensec_gssapi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index a61b2b2659c..4577c91c93a 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -703,11 +703,7 @@ init_sec_context_done:
OM_uint32 lifetime = 0;
gss_cred_usage_t usage;
const char *role = NULL;
- DEBUG(0, ("GSS %s Update(krb5)(%d) Update failed, credentials expired during GSSAPI handshake!\n",
- role,
- gensec_gssapi_state->gss_exchange_count));
-
switch (gensec_security->gensec_role) {
case GENSEC_CLIENT:
creds = gensec_gssapi_state->client_cred->creds;
@@ -719,6 +715,11 @@ init_sec_context_done:
break;
}
+ DBG_ERR("GSS %s Update(krb5)(%d) failed, credentials "
+ "expired during GSSAPI handshake!\n",
+ role,
+ gensec_gssapi_state->gss_exchange_count);
+
maj_stat = gss_inquire_cred(&min_stat,
creds,
&name, &lifetime, &usage, NULL);