libwinpr-sspi: add support for SuppressExtendedProtection registry key
This commit is contained in:
parent
4b720a6c0d
commit
fa6ff1fae0
@ -128,10 +128,21 @@ NTLM_CONTEXT* ntlm_ContextNew()
|
|||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context->SuppressExtendedProtection = FALSE;
|
||||||
|
|
||||||
|
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\LSA"), 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
|
||||||
|
|
||||||
|
if (status == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (RegQueryValueEx(hKey, _T("SuppressExtendedProtection"), NULL, &dwType, (BYTE*) &dwValue, &dwSize) == ERROR_SUCCESS)
|
||||||
|
context->SuppressExtendedProtection = dwValue ? 1 : 0;
|
||||||
|
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
|
||||||
context->NegotiateFlags = 0;
|
context->NegotiateFlags = 0;
|
||||||
context->LmCompatibilityLevel = 3;
|
context->LmCompatibilityLevel = 3;
|
||||||
context->state = NTLM_STATE_INITIAL;
|
context->state = NTLM_STATE_INITIAL;
|
||||||
context->SuppressExtendedProtection = FALSE;
|
|
||||||
memset(context->MachineID, 0xAA, sizeof(context->MachineID));
|
memset(context->MachineID, 0xAA, sizeof(context->MachineID));
|
||||||
|
|
||||||
if (context->NTLMv2)
|
if (context->NTLMv2)
|
||||||
|
Loading…
Reference in New Issue
Block a user