NTSTATUS hash_password_check(TALLOC_CTX *mem_ctx,
bool lanman_auth,
+ enum ntlm_auth_level ntlm_auth,
const struct samr_Password *client_lanman,
const struct samr_Password *client_nt,
const char *username,
const struct samr_Password *stored_lanman,
const struct samr_Password *stored_nt)
{
+ if (ntlm_auth == NTLM_AUTH_DISABLED) {
+ DBG_WARNING("hash_password_check: NTLM authentication not "
+ "permitted by configuration.\n");
+ return NT_STATUS_NTLM_BLOCKED;
+ }
+
if (stored_nt == NULL) {
DEBUG(3,("hash_password_check: NO NT password stored for user %s.\n",
username));
}
return hash_password_check(mem_ctx,
lanman_auth,
+ ntlm_auth,
lm_ok ? &client_lm : NULL,
nt_response->length ? &client_nt : NULL,
username,
NTSTATUS hash_password_check(TALLOC_CTX *mem_ctx,
bool lanman_auth,
+ enum ntlm_auth_level ntlm_auth,
const struct samr_Password *client_lanman,
const struct samr_Password *client_nt,
const char *username,
switch (user_info->password_state) {
case AUTH_PASSWORD_HASH:
status = hash_password_check(mem_ctx, lp_lanman_auth(),
+ lp_ntlm_auth(),
user_info->password.hash.lanman,
user_info->password.hash.nt,
username,
*user_sess_key = data_blob(NULL, 0);
status = hash_password_check(mem_ctx,
false,
+ lpcfg_ntlm_auth(auth_context->lp_ctx),
NULL,
user_info->password.hash.nt,
user_info->mapped.account_name,