diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-07-31 14:05:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:17 -0500 |
commit | 7a845bcb0141a895d5685afcef1ffe7f93428d0f (patch) | |
tree | 536241140ed531f2d1a8d066053cbca54b73153e /source4/utils | |
parent | 63aaa6b782bf6b8b2badabd41579fff2a235d526 (diff) | |
download | samba-7a845bcb0141a895d5685afcef1ffe7f93428d0f.tar.gz samba-7a845bcb0141a895d5685afcef1ffe7f93428d0f.tar.bz2 samba-7a845bcb0141a895d5685afcef1ffe7f93428d0f.zip |
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)
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/config.mk | 4 | ||||
-rw-r--r-- | source4/utils/ntlm_auth.c | 15 |
2 files changed, 17 insertions, 2 deletions
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; |