summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-12-27 10:33:36 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-06 08:12:48 +0100
commit21415568fe335d513545ef5788462551e2f1f1ae (patch)
tree2740f0433a36d3576e9494b05171f7640d9b651f
parent09928fbcf6bef89b7b7a4d4b48301d1377906622 (diff)
downloadsamba-21415568fe335d513545ef5788462551e2f1f1ae.tar.gz
samba-21415568fe335d513545ef5788462551e2f1f1ae.tar.bz2
samba-21415568fe335d513545ef5788462551e2f1f1ae.zip
s3-libsmb Use gensec_settings to set s3 ntlmssp client backend
This prepares us for making the code generic to multiple mechansims Signed-off-by: Stefan Metzmacher <metze@samba.org>
-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;
}