param: Add new "disabled" value to "ntlm auth" to disable NTLM totally
[nivanova/samba-autobuild/.git] / libcli / auth / ntlm_check.c
index 8e8d100075a60456535a4622596d8c3c83e4de0f..3b02adc1d482a81ce29588ec3f756c1580ed113b 100644 (file)
@@ -296,6 +296,12 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
        DATA_BLOB tmp_sess_key;
        const char *upper_client_domain = NULL;
 
+       if (ntlm_auth == NTLM_AUTH_DISABLED) {
+               DBG_WARNING("ntlm_password_check: NTLM authentication not "
+                           "permitted by configuration.\n");
+               return NT_STATUS_NTLM_BLOCKED;
+       }
+
        if (client_domain != NULL) {
                upper_client_domain = talloc_strdup_upper(mem_ctx, client_domain);
                if (upper_client_domain == NULL) {