From 7a845bcb0141a895d5685afcef1ffe7f93428d0f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 31 Jul 2006 14:05:08 +0000 Subject: r17341: pass a messaging context to auth_context_create() and gensec_server_start(). calling them with NULL for event context or messaging context is no longer allowed! metze (This used to be commit 679ac74e71b111344f1097ab389c0b83a9247710) --- source4/utils/config.mk | 4 +++- source4/utils/ntlm_auth.c | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'source4/utils') diff --git a/source4/utils/config.mk b/source4/utils/config.mk index 2dbf26940e..69d5a3b77f 100644 --- a/source4/utils/config.mk +++ b/source4/utils/config.mk @@ -31,7 +31,9 @@ PRIVATE_DEPENDENCIES = \ POPT_CREDENTIALS \ gensec \ LIBCLI_RESOLVE \ - auth + auth \ + MESSAGING \ + LIBEVENTS MANPAGE = man/ntlm_auth.1 # End BINARY ntlm_auth ################################# diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index 55aa4e65a9..9609ce59da 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -31,6 +31,9 @@ #include "libcli/auth/libcli_auth.h" #include "libcli/security/security.h" #include "lib/ldb/include/ldb.h" +#include "lib/events/events.h" +#include "lib/messaging/messaging.h" +#include "lib/messaging/irpc.h" #define SQUID_BUFFER_SIZE 2010 @@ -329,6 +332,8 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, const char *set_password; }; struct gensec_ntlm_state *state; + struct event_context *ev; + struct messaging_context *msg; NTSTATUS nt_status; BOOL first = False; @@ -399,7 +404,15 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, break; case GSS_SPNEGO_SERVER: case SQUID_2_5_NTLMSSP: - if (!NT_STATUS_IS_OK(gensec_server_start(NULL, &state->gensec_state, NULL))) { + ev = event_context_init(state); + if (!ev) { + exit(1); + } + msg = messaging_client_init(state, ev); + if (!msg) { + exit(1); + } + if (!NT_STATUS_IS_OK(gensec_server_start(state, ev, msg, &state->gensec_state))) { exit(1); } break; -- cgit