From: Stefan Metzmacher Date: Thu, 7 Jan 2016 14:01:16 +0000 (+0100) Subject: s4:auth/kerberos: improve error message in kerberos_pac_to_user_info_dc() X-Git-Tag: tdb-1.3.10~591 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b67ea0e12310979c02b1837e2179573cb081e151;p=thirdparty%2Fsamba.git s4:auth/kerberos: improve error message in kerberos_pac_to_user_info_dc() Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c index 20cfe884dab..27fb19b6e2f 100644 --- a/source4/auth/kerberos/kerberos_pac.c +++ b/source4/auth/kerberos/kerberos_pac.c @@ -310,12 +310,17 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx, PAC_TYPE_LOGON_INFO, (ndr_pull_flags_fn_t)ndr_pull_PAC_INFO); kerberos_free_data_contents(context, &k5pac_logon_info_in); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err) || !info.logon_info.info) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { nt_status = ndr_map_error2ntstatus(ndr_err); DEBUG(0,("can't parse the PAC LOGON_INFO: %s\n", nt_errstr(nt_status))); talloc_free(tmp_ctx); return EINVAL; } + if (info.logon_info.info == NULL) { + DEBUG(0,("can't parse the PAC LOGON_INFO: missing info pointer\n")); + talloc_free(tmp_ctx); + return EINVAL; + } /* Pull this right into the normal auth sysstem structures */ nt_status = make_user_info_dc_pac(mem_ctx,