summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_authservers.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-11 09:24:19 -0200
committerRenato Botelho <renato@netgate.com>2017-01-11 09:24:19 -0200
commit9da4a575f8ff670f4d79bb0b6c19e8ca3f3a3cdc (patch)
treea93d5d4a4608ddf500f25b3a2711927d4024254c /src/usr/local/www/system_authservers.php
parent6a9a75958c21ab3011ea6d52c00d5e370c08cf89 (diff)
downloadpfsense-9da4a575f8ff670f4d79bb0b6c19e8ca3f3a3cdc.zip
pfsense-9da4a575f8ff670f4d79bb0b6c19e8ca3f3a3cdc.tar.gz
Add protocol selection to Radius server configuration
It should fix #7111 Submitted by @ubawurinna at https://github.com/pfsense/pfsense/pull/2687
Diffstat (limited to 'src/usr/local/www/system_authservers.php')
-rw-r--r--src/usr/local/www/system_authservers.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php
index 7b65c46..93f0c11 100644
--- a/src/usr/local/www/system_authservers.php
+++ b/src/usr/local/www/system_authservers.php
@@ -178,6 +178,7 @@ if ($act == "edit") {
}
if ($pconfig['type'] == "radius") {
+ $pconfig['radius_protocol'] = $a_server[$id]['radius_protocol'];
$pconfig['radius_host'] = $a_server[$id]['host'];
$pconfig['radius_auth_port'] = $a_server[$id]['radius_auth_port'];
$pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port'];
@@ -208,6 +209,7 @@ if ($act == "edit") {
if ($act == "new") {
$pconfig['ldap_protver'] = 3;
$pconfig['ldap_anon'] = true;
+ $pconfig['radius_protocol'] = "MSCHAPv2";
$pconfig['radius_srvcs'] = "both";
$pconfig['radius_auth_port'] = "1812";
$pconfig['radius_acct_port'] = "1813";
@@ -247,10 +249,11 @@ if ($_POST) {
}
if ($pconfig['type'] == "radius") {
- $reqdfields = explode(" ", "name type radius_host radius_srvcs");
+ $reqdfields = explode(" ", "name type radius_protocol radius_host radius_srvcs");
$reqdfieldsn = array(
gettext("Descriptive name"),
gettext("Type"),
+ gettext("Radius Protocol"),
gettext("Hostname or IP"),
gettext("Services"));
@@ -353,6 +356,7 @@ if ($_POST) {
if ($server['type'] == "radius") {
+ $server['radius_protocol'] = $pconfig['radius_protocol'];
$server['host'] = $pconfig['radius_host'];
if ($pconfig['radius_secret']) {
@@ -724,6 +728,13 @@ $form->add($section);
$section = new Form_Section('RADIUS Server Settings');
$section->addClass('toggle-radius collapse');
+$section->addInput(new Form_Select(
+ 'radius_protocol',
+ 'Protocol',
+ $pconfig['radius_protocol'],
+ $radius_protocol
+));
+
$section->addInput(new Form_Input(
'radius_host',
'Hostname or IP address',
OpenPOWER on IntegriCloud