summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm/auth_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/auth/ntlm/auth_server.c')
-rw-r--r--source4/auth/ntlm/auth_server.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c
index f154cf0425..bb8773e75e 100644
--- a/source4/auth/ntlm/auth_server.c
+++ b/source4/auth/ntlm/auth_server.c
@@ -70,7 +70,11 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
io.in.called_name = strupper_talloc(mem_ctx, io.in.dest_host);
/* We don't want to get as far as the session setup */
- io.in.credentials = NULL;
+ io.in.credentials = cli_credentials_init_anon(mem_ctx);
+ cli_credentials_set_workstation(io.in.credentials,
+ lp_netbios_name(ctx->auth_ctx->lp_ctx),
+ CRED_SPECIFIED);
+
io.in.service = NULL;
io.in.workgroup = ""; /* only used with SPNEGO, disabled above */
@@ -79,10 +83,10 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
status = smb_composite_connect(&io, mem_ctx, lp_resolve_context(ctx->auth_ctx->lp_ctx),
ctx->auth_ctx->event_ctx);
- if (!NT_STATUS_IS_OK(status)) {
- *_blob = io.out.tree->session->transport->negotiate.secblob;
- ctx->private_data = talloc_steal(ctx, io.out.tree->session);
- }
+ NT_STATUS_NOT_OK_RETURN(status);
+
+ *_blob = io.out.tree->session->transport->negotiate.secblob;
+ ctx->private_data = talloc_steal(ctx, io.out.tree->session);
return NT_STATUS_OK;
}