1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:torture: check for pac_blob==NULL in test_generate_session_info_pac() functions

We should return an error instead of crashing for tickets without a PAC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Stefan Metzmacher 2021-12-24 15:21:21 +01:00 committed by Joseph Sutton
parent 12154b981c
commit 879eba2740
3 changed files with 15 additions and 0 deletions

View File

@ -98,6 +98,11 @@ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx,
TALLOC_CTX *tmp_ctx;
struct pac_data *pac_data;
if (pac_blob == NULL) {
DBG_ERR("pac_blob missing\n");
return NT_STATUS_NO_IMPERSONATION_TOKEN;
}
tmp_ctx = talloc_named(mem_ctx, 0, "gensec_gssapi_session_info context");
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);

View File

@ -68,6 +68,11 @@ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx,
TALLOC_CTX *tmp_ctx;
struct pac_data *pac_data;
if (pac_blob == NULL) {
DBG_ERR("pac_blob missing\n");
return NT_STATUS_NO_IMPERSONATION_TOKEN;
}
tmp_ctx = talloc_named(mem_ctx, 0, "gensec_gssapi_session_info context");
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);

View File

@ -54,6 +54,11 @@ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx,
TALLOC_CTX *tmp_ctx;
struct pac_data *pac_data;
if (pac_blob == NULL) {
DBG_ERR("pac_blob missing\n");
return NT_STATUS_NO_IMPERSONATION_TOKEN;
}
tmp_ctx = talloc_named(mem_ctx, 0, "gensec_gssapi_session_info context");
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);