summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/auth_generic.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/libsmb/auth_generic.c b/source3/libsmb/auth_generic.c
index 39d14f6fe0..d38c11cb47 100644
--- a/source3/libsmb/auth_generic.c
+++ b/source3/libsmb/auth_generic.c
@@ -52,7 +52,7 @@ NTSTATUS auth_generic_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_st
{
struct auth_generic_state *ans;
NTSTATUS nt_status;
-
+ size_t idx = 0;
struct gensec_settings *gensec_settings;
struct loadparm_context *lp_ctx;
@@ -76,18 +76,23 @@ NTSTATUS auth_generic_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 *, 3);
+ gensec_settings->backends = talloc_zero_array(gensec_settings,
+ struct gensec_security_ops *, 4);
if (gensec_settings->backends == NULL) {
TALLOC_FREE(ans);
return NT_STATUS_NO_MEMORY;
}
- gensec_settings->backends[0] = &gensec_ntlmssp3_client_ops;
+ gensec_settings->backends[idx++] = &gensec_ntlmssp3_client_ops;
#if defined(HAVE_KRB5) && defined(HAVE_GSS_WRAP_IOV)
- gensec_settings->backends[1] = &gensec_gse_krb5_security_ops;
+ gensec_settings->backends[idx++] = &gensec_gse_krb5_security_ops;
#endif
+ gensec_init();
+ gensec_settings->backends[idx++] = gensec_security_by_oid(NULL,
+ GENSEC_OID_SPNEGO);
+
nt_status = gensec_client_start(ans, &ans->gensec_security, gensec_settings);
if (!NT_STATUS_IS_OK(nt_status)) {