From 4aed9abbf84deb47e7a3aec025268a3c1e6b29bb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 19 Feb 2009 23:41:48 +0100 Subject: Remove the static "chal" from ntlmssp.c:get_challenge() --- source3/smbd/negprot.c | 5 ++--- source3/smbd/sesssetup.c | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 57608a9b40..a921954c49 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -27,7 +27,6 @@ extern enum protocol_types Protocol; static void get_challenge(uint8 buff[8]) { NTSTATUS nt_status; - const uint8 *cryptkey; /* We might be called more than once, multiple negprots are * permitted */ @@ -42,8 +41,8 @@ static void get_challenge(uint8 buff[8]) smb_panic("cannot make_negprot_global_auth_context!"); } DEBUG(10, ("get challenge: getting challenge\n")); - cryptkey = negprot_global_auth_context->get_ntlm_challenge(negprot_global_auth_context); - memcpy(buff, cryptkey, 8); + negprot_global_auth_context->get_ntlm_challenge( + negprot_global_auth_context, buff); } /**************************************************************************** diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 7a03ef7f3c..8a09ed39a9 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -1691,14 +1691,15 @@ void reply_sesssetup_and_X(struct smb_request *req) } } else { struct auth_context *plaintext_auth_context = NULL; - const uint8 *chal; nt_status = make_auth_context_subsystem( &plaintext_auth_context); if (NT_STATUS_IS_OK(nt_status)) { - chal = plaintext_auth_context->get_ntlm_challenge( - plaintext_auth_context); + uint8_t chal[8]; + + plaintext_auth_context->get_ntlm_challenge( + plaintext_auth_context, chal); if (!make_user_info_for_reply(&user_info, user, domain, chal, -- cgit