summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-01-19 22:27:51 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-01-19 12:29:05 +0100
commita7e238d3227347fa8ebcb5813d6a1811f038670f (patch)
treefc60ef54eda10bc1bfeabeab2a222b0899ad3e44 /source4/auth
parent75835d3f2fc445beae93e462b05d6fa1914815c0 (diff)
downloadsamba-a7e238d3227347fa8ebcb5813d6a1811f038670f.tar.gz
samba-a7e238d3227347fa8ebcb5813d6a1811f038670f.tar.bz2
samba-a7e238d3227347fa8ebcb5813d6a1811f038670f.zip
s4-auth Allow NULL methods to be specified to auth_context_create_methods()
This allows us to init an auth context that isn't going to do any NTLM authentication, but is used by other subsystems. Andrew Bartlett
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/ntlm/auth.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 7f355d7055..1a98fb414f 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -122,12 +122,10 @@ _PUBLIC_ NTSTATUS auth_get_server_info_principal(TALLOC_CTX *mem_ctx,
continue;
}
- NT_STATUS_NOT_OK_RETURN(nt_status);
-
- break;
+ return nt_status;
}
- return NT_STATUS_OK;
+ return NT_STATUS_NOT_IMPLEMENTED;
}
/**
@@ -437,11 +435,6 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
auth_init();
- if (!methods) {
- DEBUG(0,("auth_context_create: No auth method list!?\n"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
if (!ev) {
DEBUG(0,("auth_context_create: called with out event context\n"));
return NT_STATUS_INTERNAL_ERROR;
@@ -463,7 +456,7 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
ctx->sam_ctx = samdb_connect(ctx, ctx->event_ctx, ctx->lp_ctx, system_session(ctx->lp_ctx), 0);
}
- for (i=0; methods[i] ; i++) {
+ for (i=0; methods && methods[i] ; i++) {
struct auth_method_context *method;
method = talloc(ctx, struct auth_method_context);
@@ -480,10 +473,6 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
DLIST_ADD_END(ctx->methods, method, struct auth_method_context *);
}
- if (!ctx->methods) {
- return NT_STATUS_INTERNAL_ERROR;
- }
-
ctx->check_password = auth_check_password;
ctx->get_challenge = auth_get_challenge;
ctx->set_challenge = auth_context_set_challenge;