diff options
author | Gerald Carter <jerry@samba.org> | 2003-06-28 08:29:42 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-06-28 08:29:42 +0000 |
commit | 8a6fc79ad8d9f1b6c4f604b173426bf821f98208 (patch) | |
tree | 6cfda8b5d1f1b94c9471c98b91277cd1e4b10500 /source3/auth/auth.c | |
parent | b2fbc05c6bfd92354c8970c66581a32daaf6e6a3 (diff) | |
download | samba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.tar.gz samba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.tar.bz2 samba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.zip |
add check for NT_STATUS_NOT_IMPLEMENTED in auth check so that
map to guest = bad user works again when "trustdomain" is listed
as last auth method.
Also clean up some more DC location calls.
(This used to be commit 77a5b1032f39b8d20925721b719fdcfff910cb06)
Diffstat (limited to 'source3/auth/auth.c')
-rw-r--r-- | source3/auth/auth.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 891f47486b..25b856cd57 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -244,10 +244,22 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context, return NT_STATUS_LOGON_FAILURE; for (auth_method = auth_context->auth_method_list;auth_method; auth_method = auth_method->next) { + NTSTATUS result; + mem_ctx = talloc_init("%s authentication for user %s\\%s", auth_method->name, user_info->domain.str, user_info->smb_name.str); - nt_status = auth_method->auth(auth_context, auth_method->private_data, mem_ctx, user_info, server_info); + result = auth_method->auth(auth_context, auth_method->private_data, mem_ctx, user_info, server_info); + + /* check if the module did anything */ + if ( NT_STATUS_V(result) == NT_STATUS_V(NT_STATUS_NOT_IMPLEMENTED) ) { + DEBUG(10,("check_ntlm_password: %s had nothing to say\n", auth_method->name)); + talloc_destroy(mem_ctx); + continue; + } + + nt_status = result; + if (NT_STATUS_IS_OK(nt_status)) { DEBUG(3, ("check_ntlm_password: %s authentication for user [%s] succeeded\n", auth_method->name, user_info->smb_name.str)); |