diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-01-31 16:29:02 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-02-17 10:48:10 +0100 |
commit | 6b573e73fc5d2787ed4165024957501a7c37c27a (patch) | |
tree | 04e4aa89a12b666bb085690f557730f6bd63b07d | |
parent | 27fb6f85e7f796cafff5900d3428cc5c2c89e87d (diff) | |
download | samba-6b573e73fc5d2787ed4165024957501a7c37c27a.tar.gz samba-6b573e73fc5d2787ed4165024957501a7c37c27a.tar.bz2 samba-6b573e73fc5d2787ed4165024957501a7c37c27a.zip |
s3-auth: Use common gensec_ntlmssp
There is no longer any samba3-specific code left here.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/auth/auth_generic.c | 5 | ||||
-rw-r--r-- | source3/auth/auth_ntlmssp.c | 36 | ||||
-rw-r--r-- | source3/configure.in | 4 |
3 files changed, 5 insertions, 40 deletions
diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c index 559dce19f9..65b83f035f 100644 --- a/source3/auth/auth_generic.c +++ b/source3/auth/auth_generic.c @@ -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); diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 3cb2141a61..7b632fdf22 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -23,14 +23,6 @@ #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 -}; - diff --git a/source3/configure.in b/source3/configure.in index 938f2a344c..7b90c8f075 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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]])]) |