summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-12-30 16:53:08 +0100
committerGünther Deschner <gd@samba.org>2010-03-24 17:34:56 +0100
commitdee63fe4ca5d8dad820ff8b5f15edba41e6be65f (patch)
treea88813584a5ac1f728f3073d71d5cd76e9687801 /source3
parent2dfc78a41a34e181ba9dcacf58010ddb0883a619 (diff)
downloadsamba-dee63fe4ca5d8dad820ff8b5f15edba41e6be65f.tar.gz
samba-dee63fe4ca5d8dad820ff8b5f15edba41e6be65f.tar.xz
samba-dee63fe4ca5d8dad820ff8b5f15edba41e6be65f.zip
s3:ntlmssp: use client.netbios_name instead of workstation
metze Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_ntlmssp.c4
-rw-r--r--source3/include/ntlmssp.h1
-rw-r--r--source3/libsmb/ntlmssp.c10
-rw-r--r--source3/rpc_server/srv_pipe.c3
-rw-r--r--source3/utils/ntlm_auth.c7
5 files changed, 14 insertions, 11 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 1609c71fff9..a62d4290080 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -92,7 +92,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
/* the client has given us its machine name (which we otherwise would not get on port 445).
we need to possibly reload smb.conf if smb.conf includes depend on the machine name */
- set_remote_machine_name(auth_ntlmssp_state->ntlmssp_state->workstation, True);
+ set_remote_machine_name(auth_ntlmssp_state->ntlmssp_state->client.netbios_name, True);
/* setup the string used by %U */
/* sub_set_smb_name checks for weird internally */
@@ -103,7 +103,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
nt_status = make_user_info_map(&user_info,
auth_ntlmssp_state->ntlmssp_state->user,
auth_ntlmssp_state->ntlmssp_state->domain,
- auth_ntlmssp_state->ntlmssp_state->workstation,
+ auth_ntlmssp_state->ntlmssp_state->client.netbios_name,
auth_ntlmssp_state->ntlmssp_state->lm_resp.data ? &auth_ntlmssp_state->ntlmssp_state->lm_resp : NULL,
auth_ntlmssp_state->ntlmssp_state->nt_resp.data ? &auth_ntlmssp_state->ntlmssp_state->nt_resp : NULL,
NULL, NULL, NULL,
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h
index 8774a0b1a96..55ab9225f4f 100644
--- a/source3/include/ntlmssp.h
+++ b/source3/include/ntlmssp.h
@@ -54,7 +54,6 @@ struct ntlmssp_state
bool use_ccache;
const char *user;
const char *domain;
- const char *workstation;
unsigned char *nt_hash;
unsigned char *lm_hash;
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 58935ed19b7..5e48b1aba83 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -599,7 +599,6 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
ntlmssp_state->user = NULL;
ntlmssp_state->domain = NULL;
- ntlmssp_state->workstation = NULL;
/* now the NTLMSSP encoded auth hashes */
if (!msrpc_parse(ntlmssp_state, &request, parse_string,
@@ -609,7 +608,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
&ntlmssp_state->nt_resp,
&ntlmssp_state->domain,
&ntlmssp_state->user,
- &ntlmssp_state->workstation,
+ &ntlmssp_state->client.netbios_name,
&encrypted_session_key,
&auth_flags)) {
auth_flags = 0;
@@ -629,7 +628,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
&ntlmssp_state->nt_resp,
&ntlmssp_state->domain,
&ntlmssp_state->user,
- &ntlmssp_state->workstation)) {
+ &ntlmssp_state->client.netbios_name)) {
DEBUG(1, ("ntlmssp_server_auth: failed to parse NTLMSSP (tried both formats):\n"));
dump_data(2, request.data, request.length);
@@ -651,7 +650,10 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
}
DEBUG(3,("Got user=[%s] domain=[%s] workstation=[%s] len1=%lu len2=%lu\n",
- ntlmssp_state->user, ntlmssp_state->domain, ntlmssp_state->workstation, (unsigned long)ntlmssp_state->lm_resp.length, (unsigned long)ntlmssp_state->nt_resp.length));
+ ntlmssp_state->user, ntlmssp_state->domain,
+ ntlmssp_state->client.netbios_name,
+ (unsigned long)ntlmssp_state->lm_resp.length,
+ (unsigned long)ntlmssp_state->nt_resp.length));
#if 0
file_save("nthash1.dat", &ntlmssp_state->nt_resp.data, &ntlmssp_state->nt_resp.length);
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index f6ed50c9456..7b02ac8b1fa 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -704,7 +704,8 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
DEBUG(5, ("pipe_ntlmssp_verify_final: OK: user: %s domain: %s "
"workstation: %s\n", a->ntlmssp_state->user,
- a->ntlmssp_state->domain, a->ntlmssp_state->workstation));
+ a->ntlmssp_state->domain,
+ a->ntlmssp_state->client.netbios_name));
if (a->server_info->ptok == NULL) {
DEBUG(1,("Error: Authmodule failed to provide nt_user_token\n"));
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 3eb34a7d9a0..049aa309e65 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -571,7 +571,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB
char *unix_name = NULL;
nt_status = contact_winbind_auth_crap(ntlmssp_state->user, ntlmssp_state->domain,
- ntlmssp_state->workstation,
+ ntlmssp_state->client.netbios_name,
&ntlmssp_state->chal,
&ntlmssp_state->lm_resp,
&ntlmssp_state->nt_resp,
@@ -595,7 +595,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB
DEBUG(NT_STATUS_EQUAL(nt_status, NT_STATUS_ACCESS_DENIED) ? 0 : 3,
("Login for user [%s]\\[%s]@[%s] failed due to [%s]\n",
ntlmssp_state->domain, ntlmssp_state->user,
- ntlmssp_state->workstation,
+ ntlmssp_state->client.netbios_name,
error_string ? error_string : "unknown error (NULL)"));
ntlmssp_state->callback_private = NULL;
}
@@ -629,7 +629,8 @@ static NTSTATUS local_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *u
ntlmssp_state->user);
} else {
DEBUG(3, ("Login for user [%s]\\[%s]@[%s] failed due to [%s]\n",
- ntlmssp_state->domain, ntlmssp_state->user, ntlmssp_state->workstation,
+ ntlmssp_state->domain, ntlmssp_state->user,
+ ntlmssp_state->client.netbios_name,
nt_errstr(nt_status)));
ntlmssp_state->callback_private = NULL;
}