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_anonymous.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_anonymous.c')
-rw-r--r-- | source4/auth/auth_anonymous.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/source4/auth/auth_anonymous.c b/source4/auth/auth_anonymous.c index ce960062eb..45c5f9a7f6 100644 --- a/source4/auth/auth_anonymous.c +++ b/source4/auth/auth_anonymous.c @@ -30,21 +30,36 @@ * anonymou logons to be dealt with in one place. Non-anonymou logons 'fail' * and pass onto the next module. **/ -static NTSTATUS anonymous_check_password(struct auth_method_context *ctx, - TALLOC_CTX *mem_ctx, - const struct auth_usersupplied_info *user_info, - struct auth_serversupplied_info **_server_info) +static NTSTATUS anonymous_want_check(struct auth_method_context *ctx, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info) { if (user_info->client.account_name && *user_info->client.account_name) { return NT_STATUS_NOT_IMPLEMENTED; } + return NT_STATUS_OK; +} + +/** + * Return a anonymous logon for anonymous users (username = "") + * + * Typically used as the first module in the auth chain, this allows + * anonymou logons to be dealt with in one place. Non-anonymou logons 'fail' + * and pass onto the next module. + **/ +static NTSTATUS anonymous_check_password(struct auth_method_context *ctx, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info, + struct auth_serversupplied_info **_server_info) +{ return auth_anonymous_server_info(mem_ctx, _server_info); } static struct auth_operations anonymous_auth_ops = { .name = "anonymous", .get_challenge = auth_get_challenge_not_implemented, + .want_check = anonymous_want_check, .check_password = anonymous_check_password }; |