diff options
-rw-r--r-- | source3/auth/auth_ntlmssp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 8d213f194cf..ba7b88ac93e 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -111,13 +111,15 @@ NTSTATUS auth3_set_challenge(struct auth4_context *auth4_context, const uint8_t { struct auth_context *auth_context = talloc_get_type_abort(auth4_context->private_data, struct auth_context); + bool ok; - auth_context->challenge = data_blob_talloc(auth_context, - chal, 8); - NT_STATUS_HAVE_NO_MEMORY(auth_context->challenge.data); - - auth_context->challenge_set_by = talloc_strdup(auth_context, challenge_set_by); - NT_STATUS_HAVE_NO_MEMORY(auth_context->challenge_set_by); + ok = auth3_context_set_challenge(auth_context, chal, challenge_set_by); + if (!ok) { + /* + * This can only fail for ENOMEM + */ + return NT_STATUS_NO_MEMORY; + } DEBUG(5, ("auth_context challenge set by %s\n", auth_context->challenge_set_by)); DEBUG(5, ("challenge is: \n")); |