Guests are not allowed to save credentials
This commit is contained in:
parent
5fe06deb97
commit
b32b63631a
@ -76,16 +76,24 @@ bool eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
_Out_ LPWSTR *ppwszIdentity,
|
_Out_ LPWSTR *ppwszIdentity,
|
||||||
_Out_ EAP_ERROR **ppEapError)
|
_Out_ EAP_ERROR **ppEapError)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(dwFlags);
|
|
||||||
|
|
||||||
if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) {
|
if (cfg.m_providers.empty() || cfg.m_providers.front().m_methods.empty()) {
|
||||||
*ppEapError = make_error(ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" Configuration has no providers and/or methods."));
|
*ppEapError = make_error(ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" Configuration has no providers and/or methods."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const config_provider &cfg_prov(cfg.m_providers.front());
|
const config_provider &cfg_prov(cfg.m_providers.front());
|
||||||
const config_method_ttls *cfg_method = dynamic_cast<const config_method_ttls*>(cfg_prov.m_methods.front().get());
|
config_method_ttls *cfg_method = dynamic_cast<config_method_ttls*>(cfg_prov.m_methods.front().get());
|
||||||
assert(cfg_method);
|
assert(cfg_method);
|
||||||
|
config_method_pap *cfg_inner_pap = dynamic_cast<config_method_pap*>(cfg_method->m_inner.get());
|
||||||
|
|
||||||
|
if (dwFlags & EAP_FLAG_GUEST_ACCESS) {
|
||||||
|
// Disable credential saving for guests.
|
||||||
|
cfg_method->m_outer.m_allow_save = false;
|
||||||
|
if (cfg_inner_pap)
|
||||||
|
cfg_inner_pap->m_allow_save = false;
|
||||||
|
else
|
||||||
|
assert(0); // Unsupported inner authentication method type.
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize application.
|
// Initialize application.
|
||||||
new wxApp();
|
new wxApp();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user