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/auth/auth.c | |
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/auth/auth.c')
-rw-r--r-- | source4/auth/auth.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c index d3b9e28f7b..e478ac250b 100644 --- a/source4/auth/auth.c +++ b/source4/auth/auth.c @@ -360,8 +360,9 @@ NTSTATUS auth_check_password_recv(struct auth_check_password_request *req, Make a auth_info struct for the auth subsystem ***************************************************************************/ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, const char **methods, - struct auth_context **auth_ctx, - struct event_context *ev) + struct event_context *ev, + struct messaging_context *msg, + struct auth_context **auth_ctx) { int i; struct auth_context *ctx; @@ -371,22 +372,24 @@ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, const char **methods, return NT_STATUS_INTERNAL_ERROR; } + if (!ev) { + DEBUG(0,("auth_context_create: called with out event context\n")); + return NT_STATUS_INTERNAL_ERROR; + } + + if (!msg) { + DEBUG(0,("auth_context_create: called with out messaging context\n")); + return NT_STATUS_INTERNAL_ERROR; + } + ctx = talloc(mem_ctx, struct auth_context); NT_STATUS_HAVE_NO_MEMORY(ctx); ctx->challenge.set_by = NULL; ctx->challenge.may_be_modified = False; ctx->challenge.data = data_blob(NULL, 0); ctx->methods = NULL; - - if (ev == NULL) { - ev = event_context_init(ctx); - if (ev == NULL) { - talloc_free(ctx); - return NT_STATUS_NO_MEMORY; - } - } - - ctx->event_ctx = ev; + ctx->event_ctx = ev; + ctx->msg_ctx = msg; for (i=0; methods[i] ; i++) { struct auth_method_context *method; |