summaryrefslogtreecommitdiff
path: root/source4/auth/ntlmssp
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-12-14 20:32:47 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-12-22 17:29:15 +1100
commit0809696dbf3f551c0fbd37154025053b55fa07ee (patch)
tree59a0f30cf570fd398c2d22931b7fe374f4ee2585 /source4/auth/ntlmssp
parent383369e8f204f5a02b6c056f276f14f2f9518044 (diff)
downloadsamba-0809696dbf3f551c0fbd37154025053b55fa07ee.tar.gz
samba-0809696dbf3f551c0fbd37154025053b55fa07ee.tar.bz2
samba-0809696dbf3f551c0fbd37154025053b55fa07ee.zip
s4:auth Change 'get_challenge' API to be more like Samba3
It is just easier to fill in the known to be 8 byte challenge than stuff about with allocated pointers. Andrew Bartlett
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 94de920772..281ffbfa6d 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -600,9 +600,12 @@ NTSTATUS ntlmssp_server_auth(struct gensec_security *gensec_security,
static const uint8_t *auth_ntlmssp_get_challenge(const struct gensec_ntlmssp_state *gensec_ntlmssp_state)
{
NTSTATUS status;
- const uint8_t *chal;
+ uint8_t *chal = talloc_array(gensec_ntlmssp_state, uint8_t, 8);
+ if (!chal) {
+ return NULL;
+ }
- status = gensec_ntlmssp_state->auth_context->get_challenge(gensec_ntlmssp_state->auth_context, &chal);
+ status = gensec_ntlmssp_state->auth_context->get_challenge(gensec_ntlmssp_state->auth_context, chal);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("auth_ntlmssp_get_challenge: failed to get challenge: %s\n",
nt_errstr(status)));