mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-10-22 01:51:20 +03:00
Support EAP auth with RADIUS server for SEVPN
This commit is contained in:
1 parent
e20fa9ec2e
commit
e81ecbb0ec
3 files changed
+86
-41
No files matched your search
+2
-33
@@ -1914,7 +1914,7 @@ bool ServerAccept(CONNECTION *c)
|
||||
|
||||
if (auth_ret == false)
|
||||
{
|
||||
// Attempt external authentication registered users
|
||||
// Attempt external authentication
|
||||
bool fail_ext_user_auth = false;
|
||||
if (GetGlobalServerFlag(GSF_DISABLE_RADIUS_AUTH) != 0)
|
||||
{
|
||||
@@ -1923,7 +1923,7 @@ bool ServerAccept(CONNECTION *c)
|
||||
|
||||
if (fail_ext_user_auth == false)
|
||||
{
|
||||
auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, false, mschap_v2_server_response_20, &radius_login_opt);
|
||||
auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, true, mschap_v2_server_response_20, &radius_login_opt);
|
||||
}
|
||||
|
||||
if (auth_ret && pol == NULL)
|
||||
@@ -1932,37 +1932,6 @@ bool ServerAccept(CONNECTION *c)
|
||||
}
|
||||
}
|
||||
|
||||
if (auth_ret == false)
|
||||
{
|
||||
// Attempt external authentication asterisk user
|
||||
bool b = false;
|
||||
bool fail_ext_user_auth = false;
|
||||
|
||||
if (GetGlobalServerFlag(GSF_DISABLE_RADIUS_AUTH) != 0)
|
||||
{
|
||||
fail_ext_user_auth = true;
|
||||
}
|
||||
|
||||
if (fail_ext_user_auth == false)
|
||||
{
|
||||
AcLock(hub);
|
||||
{
|
||||
b = AcIsUser(hub, "*");
|
||||
}
|
||||
AcUnlock(hub);
|
||||
|
||||
// If there is asterisk user, log on as the user
|
||||
if (b)
|
||||
{
|
||||
auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, true, mschap_v2_server_response_20, &radius_login_opt);
|
||||
if (auth_ret && pol == NULL)
|
||||
{
|
||||
pol = SamGetUserPolicy(hub, "*");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pol != NULL)
|
||||
{
|
||||
no_save_password = pol->NoSavePassword;
|
||||
|
||||
Reference in new issue
Block a user