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:
parent
12154b981c
commit
879eba2740
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user