summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-03 16:15:27 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-03 16:53:35 +0200
commit0f35d51ab65b974d3362e0b6f7ebff7b41fb5835 (patch)
tree6ad504c38bf2703cf54b0207f01b83a9150089aa
parent5b0e0acc819dedba3ef631e66be6c632fdf23e77 (diff)
downloadsamba-0f35d51ab65b974d3362e0b6f7ebff7b41fb5835.tar.gz
samba-0f35d51ab65b974d3362e0b6f7ebff7b41fb5835.tar.bz2
samba-0f35d51ab65b974d3362e0b6f7ebff7b41fb5835.zip
s4:auth_winbind: fix segfault in winbind_check_password_wbclient()
We should only look at err if WBC_ERR_AUTH_ERROR is returned. metze
-rw-r--r--source4/auth/ntlm/auth_winbind.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index f680bcbf7f..06be4fc913 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -392,13 +392,17 @@ static NTSTATUS winbind_check_password_wbclient(struct auth_method_context *ctx,
user_info->password.response.nt.data;
wbc_status = wbcAuthenticateUserEx(&params, &info, &err);
- if (!WBC_ERROR_IS_OK(wbc_status)) {
+ if (wbc_status == WBC_ERR_AUTH_ERROR) {
DEBUG(1, ("error was %s (0x%08x)\nerror message was '%s'\n",
err->nt_string, err->nt_status, err->display_string));
nt_status = NT_STATUS(err->nt_status);
wbcFreeMemory(err);
NT_STATUS_NOT_OK_RETURN(nt_status);
+ } else if (!WBC_ERROR_IS_OK(wbc_status)) {
+ DEBUG(1, ("wbcAuthenticateUserEx: failed with %u - %s\n",
+ wbc_status, wbcErrorString(wbc_status)));
+ return NT_STATUS_LOGON_FAILURE;
}
nt_status = get_info3_from_wbcAuthUserInfo(mem_ctx, info, &info3);
wbcFreeMemory(info);