diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-07-27 11:24:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:10:25 -0500 |
commit | e8623667d32f717b0b746e5041500bd0ee6b3ae8 (patch) | |
tree | d789a33d4bf6f41b6e525478fe943b387500de2b /source4/auth/auth_developer.c | |
parent | 28b8ec0156e99d7bddc2aa243f6631a66c94a078 (diff) | |
download | samba-e8623667d32f717b0b746e5041500bd0ee6b3ae8.tar.gz samba-e8623667d32f717b0b746e5041500bd0ee6b3ae8.tar.bz2 samba-e8623667d32f717b0b746e5041500bd0ee6b3ae8.zip |
r17270: split the logic of saying this auth backend wants to handle this
request from the password checking. This will help to make
the password checking hook async later
metze
(This used to be commit 5b26cbc3428b4c186235cc08c9ace1c23f59dd7f)
Diffstat (limited to 'source4/auth/auth_developer.c')
-rw-r--r-- | source4/auth/auth_developer.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/source4/auth/auth_developer.c b/source4/auth/auth_developer.c index 25c828c2a1..76044d4361 100644 --- a/source4/auth/auth_developer.c +++ b/source4/auth/auth_developer.c @@ -24,6 +24,13 @@ #include "auth/auth.h" #include "libcli/security/security.h" +static NTSTATUS name_to_ntstatus_want_check(struct auth_method_context *ctx, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info) +{ + return NT_STATUS_OK; +} + /** * Return an error based on username * @@ -56,10 +63,7 @@ static NTSTATUS name_to_ntstatus_check_password(struct auth_method_context *ctx, DEBUG(5,("name_to_ntstatus_check_password: Error for user %s was 0x%08X\n", user, error_num)); nt_status = NT_STATUS(error_num); } - - if (!NT_STATUS_IS_OK(nt_status)) { - return nt_status; - } + NT_STATUS_NOT_OK_RETURN(nt_status); server_info = talloc(mem_ctx, struct auth_serversupplied_info); NT_STATUS_HAVE_NO_MEMORY(server_info); @@ -128,6 +132,7 @@ static NTSTATUS name_to_ntstatus_check_password(struct auth_method_context *ctx, static struct auth_operations name_to_ntstatus_auth_ops = { .name = "name_to_ntstatus", .get_challenge = auth_get_challenge_not_implemented, + .want_check = name_to_ntstatus_want_check, .check_password = name_to_ntstatus_check_password }; @@ -157,18 +162,27 @@ static NTSTATUS fixed_challenge_get_challenge(struct auth_method_context *ctx, T return NT_STATUS_OK; } +static NTSTATUS fixed_challenge_want_check(struct auth_method_context *ctx, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info) +{ + /* don't handle any users */ + return NT_STATUS_NOT_IMPLEMENTED; +} + static NTSTATUS fixed_challenge_check_password(struct auth_method_context *ctx, TALLOC_CTX *mem_ctx, const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **_server_info) { /* don't handle any users */ - return NT_STATUS_NOT_IMPLEMENTED; + return NT_STATUS_NO_SUCH_USER; } static struct auth_operations fixed_challenge_auth_ops = { .name = "fixed_challenge", .get_challenge = fixed_challenge_get_challenge, + .want_check = fixed_challenge_want_check, .check_password = fixed_challenge_check_password }; |