secur32: Also recognize samba4 failure message if ntlm_auth could not connect to winbindd.

This commit is contained in:
Dmitry Timoshkov 2014-04-12 15:24:20 +09:00 committed by Alexandre Julliard
parent ab5db46477
commit 8df0479870
1 changed files with 6 additions and 4 deletions

View File

@ -1226,11 +1226,13 @@ SECURITY_STATUS SEC_ENTRY ntlm_AcceptSecurityContext(
} }
else else
{ {
size_t ntlm_pipe_err_len = strlen("BH NT_STATUS_ACCESS_DENIED"); size_t ntlm_pipe_err_v3_len = strlen("BH NT_STATUS_ACCESS_DENIED");
size_t ntlm_pipe_err_v4_len = strlen("BH NT_STATUS_UNSUCCESSFUL");
if( (buffer_len >= ntlm_pipe_err_len) && if( (buffer_len >= ntlm_pipe_err_v3_len &&
(strncmp(buffer, "BH NT_STATUS_ACCESS_DENIED", strncmp(buffer, "BH NT_STATUS_ACCESS_DENIED", ntlm_pipe_err_v3_len) == 0) ||
ntlm_pipe_err_len) == 0)) (buffer_len >= ntlm_pipe_err_v4_len &&
strncmp(buffer, "BH NT_STATUS_UNSUCCESSFUL", ntlm_pipe_err_v4_len) == 0) )
{ {
TRACE("Connection to winbindd failed\n"); TRACE("Connection to winbindd failed\n");
ret = SEC_E_LOGON_DENIED; ret = SEC_E_LOGON_DENIED;