From 5d68244a27c7fcdb2024d94593db30d04cc61386 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Aug 2008 15:19:27 +0200 Subject: auth_server: fix segfault reported by Julien Kerihuel metze (This used to be commit c2cc8ef943e8c2e02edb1eb20214de245cc6914c) --- source4/auth/ntlm/auth_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/auth/ntlm') diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c index f154cf0425..7efbdb3050 100644 --- a/source4/auth/ntlm/auth_server.c +++ b/source4/auth/ntlm/auth_server.c @@ -70,7 +70,7 @@ 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); io.in.service = NULL; io.in.workgroup = ""; /* only used with SPNEGO, disabled above */ -- cgit From f1cdce59632b893be89f784f2fb41b28f3a87170 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Aug 2008 15:53:01 +0200 Subject: auth_server: fix the logic of server_get_challenge() metze (This used to be commit 699e3cdb52acdf2524347d8c053730306c579dd9) --- source4/auth/ntlm/auth_server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/auth/ntlm') diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c index 7efbdb3050..42606c14ba 100644 --- a/source4/auth/ntlm/auth_server.c +++ b/source4/auth/ntlm/auth_server.c @@ -79,10 +79,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; } -- cgit From ca086c9e2c9634763f3faff99b44e511aa626a3f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Aug 2008 17:22:54 +0200 Subject: auth_server: set the workstation name metze (This used to be commit 6d640ee4b84c72f6c2da0ee047c9bac916bf3e57) --- source4/auth/ntlm/auth_server.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/auth/ntlm') diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c index 42606c14ba..bb8773e75e 100644 --- a/source4/auth/ntlm/auth_server.c +++ b/source4/auth/ntlm/auth_server.c @@ -71,6 +71,10 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX /* We don't want to get as far as the session setup */ 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 */ -- cgit