(*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;
}
struct ntlmssp_state
{
enum ntlmssp_role role;
- enum server_types server_role;
uint32_t expected_state;
bool unicode;
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 */
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 {
(*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;