]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: Fix debug statement in gensec_gssapi
authorAndreas Schneider <asn@samba.org>
Wed, 8 May 2019 14:27:57 +0000 (16:27 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 8 May 2019 16:33:24 +0000 (16:33 +0000)
The 'role' is set to null, we should first set it to the correct value
before printing anything.

Found by GCC 9.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/auth/gensec/gensec_gssapi.c

index a61b2b2659cbd4001e2acfd4afdccf4999d15fa3..4577c91c93a2e477155015501d23ea985f68fc7a 100644 (file)
@@ -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);