diff options
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.h | 6 | ||||
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_server.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index 82e9ccfd06..44a1064e15 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "librpc/gen_ndr/samr.h" #include "../librpc/gen_ndr/ntlmssp.h" /* NTLMSSP mode */ @@ -48,7 +47,6 @@ enum ntlmssp_message_type struct gensec_ntlmssp_state { enum ntlmssp_role role; - enum samr_Role server_role; uint32_t expected_state; bool unicode; @@ -66,6 +64,10 @@ struct gensec_ntlmssp_state const char *workstation; 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/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index 428178158d..484cf3f51d 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -92,7 +92,7 @@ static const char *ntlmssp_target_name(struct gensec_ntlmssp_state *gensec_ntlms if (neg_flags & NTLMSSP_REQUEST_TARGET) { *chal_flags |= NTLMSSP_NEGOTIATE_TARGET_INFO; *chal_flags |= NTLMSSP_REQUEST_TARGET; - if (gensec_ntlmssp_state->server_role == ROLE_STANDALONE) { + if (gensec_ntlmssp_state->server.is_standalone) { *chal_flags |= NTLMSSP_TARGET_TYPE_SERVER; return gensec_ntlmssp_state->server_name; } else { @@ -819,7 +819,11 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security) gensec_ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge; gensec_ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge; gensec_ntlmssp_state->check_password = auth_ntlmssp_check_password; - gensec_ntlmssp_state->server_role = lp_server_role(gensec_security->settings->lp_ctx); + if (lp_server_role(gensec_security->settings->lp_ctx) == ROLE_STANDALONE) { + gensec_ntlmssp_state->server.is_standalone = true; + } else { + gensec_ntlmssp_state->server.is_standalone = false; + } return NT_STATUS_OK; } |