auth/kerberos: Ensure we do not print invalid memory in failure case
authorAndrew Bartlett <abartlet@samba.org>
Thu, 8 Mar 2012 05:15:09 +0000 (16:15 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 8 Mar 2012 09:14:05 +0000 (10:14 +0100)
This codeblock may not have any set->elements, so we should not print them.  Copy&paste in the original code.

Andrew Bartlett

auth/kerberos/gssapi_pac.c

index d0de11efdf2c280d20ad5d29dd97667f5f939844..8a4d8c3be144ab09be957d464a403f44abf555d3 100644 (file)
@@ -209,10 +209,7 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
                krb5_free_keyblock(NULL /* should be krb5_context */, subkey);
                return NT_STATUS_OK;
 #else
-               DEBUG(0, ("gss_inquire_sec_context_by_oid returned unknown "
-                         "OID for data in results:\n"));
-               dump_data(1, (uint8_t *)set->elements[1].value,
-                            set->elements[1].length);
+               DEBUG(0, ("gss_inquire_sec_context_by_oid didn't return any session key (and no alternative method available)\n"));
                return NT_STATUS_NO_USER_SESSION_KEY;
 #endif
        }