diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_ntlmssp.c | 6 | ||||
-rw-r--r-- | source3/include/ntlmssp.h | 5 | ||||
-rw-r--r-- | source3/libsmb/ntlmssp.c | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 88f0e69443..9eccebc564 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -184,7 +184,11 @@ NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state) (*auth_ntlmssp_state)->ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge; (*auth_ntlmssp_state)->ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge; (*auth_ntlmssp_state)->ntlmssp_state->check_password = auth_ntlmssp_check_password; - (*auth_ntlmssp_state)->ntlmssp_state->server_role = (enum server_types)lp_server_role(); + if ((enum server_types)lp_server_role() == ROLE_STANDALONE) { + (*auth_ntlmssp_state)->ntlmssp_state->server.is_standalone = true; + } else { + (*auth_ntlmssp_state)->ntlmssp_state->server.is_standalone = false; + } return NT_STATUS_OK; } diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h index 31b614fb54..636a0e7d5d 100644 --- a/source3/include/ntlmssp.h +++ b/source3/include/ntlmssp.h @@ -45,7 +45,6 @@ enum ntlmssp_message_type struct ntlmssp_state { enum ntlmssp_role role; - enum server_types server_role; uint32_t expected_state; bool unicode; @@ -58,6 +57,10 @@ struct ntlmssp_state unsigned char *lm_hash; char *server_domain; + struct { + bool is_standalone; + } server; + DATA_BLOB internal_chal; /* Random challenge as supplied to the client for NTLM authentication */ DATA_BLOB chal; /* Random challenge as input into the actual NTLM (or NTLM2) authentication */ diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index 8a5b7ac5c4..c5b445d443 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -367,7 +367,7 @@ static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state, if (neg_flags & NTLMSSP_REQUEST_TARGET) { *chal_flags |= NTLMSSP_NEGOTIATE_TARGET_INFO; *chal_flags |= NTLMSSP_REQUEST_TARGET; - if (ntlmssp_state->server_role == ROLE_STANDALONE) { + if (ntlmssp_state->server.is_standalone) { *chal_flags |= NTLMSSP_TARGET_TYPE_SERVER; return ntlmssp_state->get_global_myname(); } else { @@ -902,7 +902,7 @@ NTSTATUS ntlmssp_server_start(struct ntlmssp_state **ntlmssp_state) (*ntlmssp_state)->get_global_myname = global_myname; (*ntlmssp_state)->get_domain = lp_workgroup; - (*ntlmssp_state)->server_role = ROLE_DOMAIN_MEMBER; /* a good default */ + (*ntlmssp_state)->server.is_standalone = false; /* a good default */ (*ntlmssp_state)->expected_state = NTLMSSP_NEGOTIATE; |