summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/ntlmssp_wrap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp_wrap.c b/source3/libsmb/ntlmssp_wrap.c
index de3d0a1bf2..e2d1bc636f 100644
--- a/source3/libsmb/ntlmssp_wrap.c
+++ b/source3/libsmb/ntlmssp_wrap.c
@@ -181,6 +181,14 @@ NTSTATUS auth_ntlmssp_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_st
return NT_STATUS_NO_MEMORY;
}
+ gensec_settings->backends = talloc_zero_array(gensec_settings, struct gensec_security_ops *, 2);
+ if (gensec_settings->backends == NULL) {
+ TALLOC_FREE(ans);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ gensec_settings->backends[0] = &gensec_ntlmssp3_client_ops;
+
nt_status = gensec_client_start(ans, &ans->gensec_security, gensec_settings);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -217,8 +225,8 @@ NTSTATUS auth_ntlmssp_client_start(struct auth_generic_state *ans)
talloc_unlink(ans, ans->credentials);
ans->credentials = NULL;
- status = gensec_start_mech_by_ops(ans->gensec_security,
- &gensec_ntlmssp3_client_ops);
+ status = gensec_start_mech_by_oid(ans->gensec_security,
+ GENSEC_OID_NTLMSSP);
if (!NT_STATUS_IS_OK(status)) {
return status;
}