summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm/auth_server.c
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/ntlm/auth_server.c
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/ntlm/auth_server.c')
-rw-r--r--source4/auth/ntlm/auth_server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c
index 12849aa420..ae7b7dd3a8 100644
--- a/source4/auth/ntlm/auth_server.c
+++ b/source4/auth/ntlm/auth_server.c
@@ -40,7 +40,7 @@ static NTSTATUS server_want_check(struct auth_method_context *ctx,
/**
* The challenge from the target server, when operating in security=server
**/
-static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX *mem_ctx, DATA_BLOB *_blob)
+static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX *mem_ctx, uint8_t chal[8])
{
struct smb_composite_connect io;
struct smbcli_options smb_options;
@@ -88,7 +88,10 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
ctx->auth_ctx->event_ctx);
NT_STATUS_NOT_OK_RETURN(status);
- *_blob = io.out.tree->session->transport->negotiate.secblob;
+ if (io.out.tree->session->transport->negotiate.secblob.length != 8) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ memcpy(chal, io.out.tree->session->transport->negotiate.secblob.data, 8);
ctx->private_data = talloc_steal(ctx, io.out.tree->session);
return NT_STATUS_OK;
}