Commit 7788c8ed authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

secur32: Work around ntlm_auth in Samba 3.0.28a being broken for cached credentials.

Samba 3.0.28a (as shipped with Ubuntu 8.04) seems to break when using cached credentials backed by winbindd, returning a BH error in our test if we still need to provide a password. Handle this and report a more correct error.
parent 69ec6b4c
......@@ -662,8 +662,20 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
ret = SEC_E_NO_CREDENTIALS;
goto isc_end;
}
else /* Just do a noop on the next run */
else
{
/* Some versions of Samba have a broken ntlm_auth that can
* return "BH" here. Catch this and abort. */
if(!strncmp(buffer, "BH", 2))
{
ERR("ntlm_auth replied 'BH'. This should not happen. "
"Please fix your ntlm_auth install and try again.\n");
ret = SEC_E_INTERNAL_ERROR;
goto isc_end;
}
/* Otherwise, just do a noop on the next run */
lstrcpynA(buffer, "OK", max_len-1);
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment