summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-06-17 00:26:18 +0200
committerStefan Metzmacher <metze@samba.org>2017-06-27 16:57:48 +0200
commit28f2039886870a1f2f0eba7dd7420d08a479cf97 (patch)
treebe0b332b31cf1adb99673e8d3a56f5abf4b7d887 /source4/auth
parentb039ef422444144c52194f030f6df92dd29bbeef (diff)
downloadsamba-28f2039886870a1f2f0eba7dd7420d08a479cf97.tar.gz
s4:auth_winbind: fix error checking in winbind_check_password()
We need to handle every error instead of just NT_STATUS_NO_SUCH_USER, the callers also doesn't require NT_STATUS_NOT_IMPLEMENTED anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/ntlm/auth_winbind.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 7308a17a6bc..65ad9b6120f 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -189,9 +189,11 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx,
status = dcerpc_winbind_SamLogon_r(irpc_handle, s, &s->req);
NT_STATUS_NOT_OK_RETURN(status);
- if (NT_STATUS_EQUAL(s->req.out.result, NT_STATUS_NO_SUCH_USER) &&
- !s->req.out.authoritative) {
- return NT_STATUS_NOT_IMPLEMENTED;
+ if (!NT_STATUS_IS_OK(s->req.out.result)) {
+ if (!s->req.out.authoritative) {
+ *authoritative = false;
+ }
+ return s->req.out.result;
}
/*
@@ -199,7 +201,7 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx,
* This means that lockouts happen at a badPwdCount earlier than
* normal, but makes it more fault tolerant.
*/
- if (NT_STATUS_IS_OK(s->req.out.result)) {
+ {
const char *account_name = user_info->mapped.account_name;
const char *p = NULL;
p = strchr_m(account_name, '@');