From e8623667d32f717b0b746e5041500bd0ee6b3ae8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 27 Jul 2006 11:24:18 +0000 Subject: 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) --- source4/auth/auth_winbind.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/auth/auth_winbind.c') diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c index 4a031e6b94..3783d0f975 100644 --- a/source4/auth/auth_winbind.c +++ b/source4/auth/auth_winbind.c @@ -46,6 +46,18 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response } } +static NTSTATUS winbind_want_check(struct auth_method_context *ctx, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info) +{ + if (!user_info->mapped.account_name || !*user_info->mapped.account_name) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + /* TODO: maybe limit the user scope to remote users only */ + return NT_STATUS_OK; +} + /* Authenticate a user with a challenge/response */ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, TALLOC_CTX *mem_ctx, @@ -129,6 +141,7 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, static const struct auth_operations winbind_ops = { .name = "winbind", .get_challenge = auth_get_challenge_not_implemented, + .want_check = winbind_want_check, .check_password = winbind_check_password }; -- cgit