mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
auth/ntlmssp: define all client neg_flags in gensec_ntlmssp_client_start()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
30d626024c
commit
afba38dbf5
@ -71,16 +71,6 @@ NTSTATUS ntlmssp_client_initial(struct gensec_security *gensec_security,
|
||||
workstation = "";
|
||||
}
|
||||
|
||||
if (ntlmssp_state->unicode) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
|
||||
} else {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_OEM;
|
||||
}
|
||||
|
||||
if (ntlmssp_state->use_ntlmv2) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;
|
||||
}
|
||||
|
||||
/* generate the ntlmssp negotiate packet */
|
||||
status = msrpc_gen(out_mem_ctx,
|
||||
out, "CddAA",
|
||||
@ -604,6 +594,12 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
|
||||
NTLMSSP_NEGOTIATE_NTLM |
|
||||
NTLMSSP_REQUEST_TARGET;
|
||||
|
||||
if (ntlmssp_state->unicode) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
|
||||
} else {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_OEM;
|
||||
}
|
||||
|
||||
if (gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "128bit", true)) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_128;
|
||||
}
|
||||
@ -631,6 +627,10 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
|
||||
ntlmssp_state->use_ntlmv2 = false;
|
||||
}
|
||||
|
||||
if (ntlmssp_state->use_ntlmv2) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;
|
||||
}
|
||||
|
||||
if (gensec_security->want_features & GENSEC_FEATURE_SESSION_KEY) {
|
||||
/*
|
||||
* We need to set this to allow a later SetPassword
|
||||
|
Loading…
x
Reference in New Issue
Block a user