From f3b005e7595288096a4fac220709b7af26aa7b62 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 11 Mar 2012 07:04:38 +1100 Subject: s3-auth: Order GENSEC mechs by priority, krb5 before NTLMSSP Otherwise, really simple clients (such as the current ntlm_auth gss-spnego client) will not select krb5. Andrew Bartlett Signed-off-by: Stefan Metzmacher --- source3/libsmb/auth_generic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/auth_generic.c') diff --git a/source3/libsmb/auth_generic.c b/source3/libsmb/auth_generic.c index dbd87fff2b..f1510d2e90 100644 --- a/source3/libsmb/auth_generic.c +++ b/source3/libsmb/auth_generic.c @@ -83,13 +83,15 @@ NTSTATUS auth_generic_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_st return NT_STATUS_NO_MEMORY; } - gensec_settings->backends[idx++] = &gensec_ntlmssp3_client_ops; + gensec_init(); + /* These need to be in priority order, krb5 before NTLMSSP */ #if defined(HAVE_KRB5) gensec_settings->backends[idx++] = &gensec_gse_krb5_security_ops; #endif - gensec_init(); + gensec_settings->backends[idx++] = &gensec_ntlmssp3_client_ops; + gensec_settings->backends[idx++] = gensec_security_by_oid(NULL, GENSEC_OID_SPNEGO); -- cgit