s3-auth: Use common gensec_ntlmssp
authorAndrew Bartlett <abartlet@samba.org>
Tue, 31 Jan 2012 05:29:02 +0000 (16:29 +1100)
committerStefan Metzmacher <metze@samba.org>
Fri, 17 Feb 2012 09:48:10 +0000 (10:48 +0100)
There is no longer any samba3-specific code left here.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/auth/auth_generic.c
source3/auth/auth_ntlmssp.c
source3/configure.in

index 559dce19f952d6aa5e7a7cb213ed173e1241a533..65b83f035f6c0761b1ebc63feb3e37de009a7dfd 100644 (file)
@@ -250,13 +250,14 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx,
                        return NT_STATUS_NO_MEMORY;
                }
 
-               gensec_settings->backends[idx++] = &gensec_ntlmssp3_server_ops;
+               gensec_init();
+
+               gensec_settings->backends[idx++] = gensec_security_by_oid(NULL, GENSEC_OID_NTLMSSP);
 
 #if defined(HAVE_KRB5) && defined(HAVE_GSS_WRAP_IOV)
                gensec_settings->backends[idx++] = &gensec_gse_krb5_security_ops;
 #endif
 
-               gensec_init();
                gensec_settings->backends[idx++] = gensec_security_by_oid(NULL,
                                                        GENSEC_OID_SPNEGO);
 
index 3cb2141a61253b595bffcd1ae2ac368c97486ee5..7b632fdf226671abd2000e47acdc951b2435ea84 100644 (file)
 
 #include "includes.h"
 #include "auth.h"
-#include "../auth/ntlmssp/ntlmssp.h"
-#include "../auth/ntlmssp/ntlmssp_private.h"
-#include "../librpc/gen_ndr/netlogon.h"
-#include "../librpc/gen_ndr/dcerpc.h"
-#include "../lib/tsocket/tsocket.h"
-#include "auth/gensec/gensec.h"
-#include "librpc/rpc/dcerpc.h"
-#include "lib/param/param.h"
 
 NTSTATUS auth3_generate_session_info(TALLOC_CTX *mem_ctx,
                                     struct auth4_context *auth_context,
@@ -201,31 +193,3 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
        *server_returned_info = talloc_steal(mem_ctx, server_info);
        return nt_status;
 }
-
-static const char *gensec_ntlmssp3_server_oids[] = {
-       GENSEC_OID_NTLMSSP,
-       NULL
-};
-
-const struct gensec_security_ops gensec_ntlmssp3_server_ops = {
-       .name           = "ntlmssp3_server",
-       .sasl_name      = GENSEC_SASL_NAME_NTLMSSP, /* "NTLM" */
-       .auth_type      = DCERPC_AUTH_TYPE_NTLMSSP,
-       .oid            = gensec_ntlmssp3_server_oids,
-       .server_start   = gensec_ntlmssp_server_start,
-       .magic          = gensec_ntlmssp_magic,
-       .update         = gensec_ntlmssp_update,
-       .sig_size       = gensec_ntlmssp_sig_size,
-       .sign_packet    = gensec_ntlmssp_sign_packet,
-       .check_packet   = gensec_ntlmssp_check_packet,
-       .seal_packet    = gensec_ntlmssp_seal_packet,
-       .unseal_packet  = gensec_ntlmssp_unseal_packet,
-       .wrap           = gensec_ntlmssp_wrap,
-       .unwrap         = gensec_ntlmssp_unwrap,
-       .session_key    = gensec_ntlmssp_session_key,
-       .session_info   = gensec_ntlmssp_session_info,
-       .have_feature   = gensec_ntlmssp_have_feature,
-       .enabled        = true,
-       .priority       = GENSEC_NTLMSSP
-};
-
index 938f2a344ce5ec528847d6d7c39df9c0ea4c53f1..7b90c8f075dcbe608a737dcebdb6e67872017cbb 100644 (file)
@@ -7123,8 +7123,8 @@ AC_ZLIB([ZLIB_OBJS=""], [
        CFLAGS="-I../lib/zlib $CFLAGS"
 ])
 
-AC_DEFINE(STATIC_gensec_MODULES, [gensec_spnego_init,NULL],[gensec modules])
-AC_DEFINE(STATIC_gensec_MODULES_PROTO, [_MODULE_PROTO(gensec_spnego_init)],[gensec protos])
+AC_DEFINE(STATIC_gensec_MODULES, [gensec_spnego_init,gensec_ntlmssp_init,NULL],[gensec modules])
+AC_DEFINE(STATIC_gensec_MODULES_PROTO, [_MODULE_PROTO(gensec_spnego_init)_MODULE_PROTO(gensec_ntlmssp_init)],[gensec protos])
 
 AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])])