diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-02-13 10:24:16 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-02-13 10:24:16 +1100 |
commit | 71632a16977a93968b0d520a491a52f635e611a1 (patch) | |
tree | 75604f676004c10bdd9c4ee1cfdf917a90ddfc0b /source4/rpc_server | |
parent | 147a2e3440056ec30d8b386901754a58ea3947d1 (diff) | |
download | samba-71632a16977a93968b0d520a491a52f635e611a1.tar.gz samba-71632a16977a93968b0d520a491a52f635e611a1.tar.bz2 samba-71632a16977a93968b0d520a491a52f635e611a1.zip |
Remove auth/ntlm as a dependency of GENSEC by means of function pointers.
When starting GENSEC on the server, the auth subsystem context must be
passed in, which now includes function pointers to the key elements.
This should (when the other dependencies are fixed up) allow GENSEC to
exist as a client or server library without bundling in too much of
our server code.
Andrew Bartlett
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/config.mk | 2 | ||||
-rw-r--r-- | source4/rpc_server/dcesrv_auth.c | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk index a7d03ca22d..d05b0a0c0d 100644 --- a/source4/rpc_server/config.mk +++ b/source4/rpc_server/config.mk @@ -203,7 +203,7 @@ dcerpc_browser_OBJ_FILES = $(rpc_serversrcdir)/browser/dcesrv_browser.o PRIVATE_DEPENDENCIES = \ LIBCLI_AUTH \ LIBNDR \ - dcerpc + dcerpc samba_server_gensec dcerpc_server_OBJ_FILES = $(addprefix $(rpc_serversrcdir)/, \ dcerpc_server.o \ diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c index 5169031d16..e2e3b77948 100644 --- a/source4/rpc_server/dcesrv_auth.c +++ b/source4/rpc_server/dcesrv_auth.c @@ -27,6 +27,7 @@ #include "librpc/gen_ndr/ndr_dcerpc.h" #include "auth/credentials/credentials.h" #include "auth/gensec/gensec.h" +#include "auth/auth.h" #include "param/param.h" /* @@ -61,14 +62,6 @@ bool dcesrv_auth_bind(struct dcesrv_call_state *call) return false; } - status = gensec_server_start(dce_conn, call->event_ctx, - lp_gensec_settings(dce_conn, call->conn->dce_ctx->lp_ctx), - call->msg_ctx, &auth->gensec_security); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Failed to start GENSEC for DCERPC server: %s\n", nt_errstr(status))); - return false; - } - server_credentials = cli_credentials_init(call); if (!server_credentials) { @@ -84,7 +77,12 @@ bool dcesrv_auth_bind(struct dcesrv_call_state *call) server_credentials = NULL; } - gensec_set_credentials(auth->gensec_security, server_credentials); + status = samba_server_gensec_start(dce_conn, call->event_ctx, + call->msg_ctx, + call->conn->dce_ctx->lp_ctx, + server_credentials, + NULL, + &auth->gensec_security); status = gensec_start_mech_by_authtype(auth->gensec_security, auth->auth_info->auth_type, auth->auth_info->auth_level); |