diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-02 20:27:05 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-02 20:27:05 +0000 |
commit | acee624f83b0ce13e4eb897640353c95826e7876 (patch) | |
tree | 07c5a29b068459c506ba5ab513e637edcd2d7ad2 /usr/local | |
parent | cc686d98fe3b7c1c34ccb97a9b30a57bfc2ab96e (diff) | |
download | pfsense-acee624f83b0ce13e4eb897640353c95826e7876.zip pfsense-acee624f83b0ce13e4eb897640353c95826e7876.tar.gz |
Do not allow same names on different auth servers. While here correct radius default ports.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/system_authservers.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php index 799a77c..428a442 100644 --- a/usr/local/www/system_authservers.php +++ b/usr/local/www/system_authservers.php @@ -39,6 +39,7 @@ ##|-PRIV require("guiconfig.inc"); +require_once("auth.inc"); $pgtitle = array("System", "Authentication Servers"); @@ -107,13 +108,13 @@ if ($act == "edit") { if ( $pconfig['radius_auth_port'] && !$pconfig['radius_acct_port'] ) { $pconfig['radius_srvcs'] = "auth"; - $pconfig['radius_acct_port'] = 813; + $pconfig['radius_acct_port'] = 1813; } if (!$pconfig['radius_auth_port'] && $pconfig['radius_acct_port'] ) { $pconfig['radius_srvcs'] = "acct"; - $pconfig['radius_auth_port'] = 812; + $pconfig['radius_auth_port'] = 1812; } } @@ -124,8 +125,8 @@ if ($act == "new") { $pconfig['ldap_protver'] = 3; $pconfig['ldap_anon'] = true; $pconfig['radius_srvcs'] = "both"; - $pconfig['radius_auth_port'] = "812"; - $pconfig['radius_acct_port'] = "813"; + $pconfig['radius_auth_port'] = "1812"; + $pconfig['radius_acct_port'] = "1813"; } if ($_POST) { @@ -149,6 +150,7 @@ if ($_POST) { $reqdfieldsn[] = "Bind user DN"; $reqdfieldsn[] = "Bind Password"; } + } if ($pconfig['type'] == "radius") { @@ -179,6 +181,9 @@ if ($_POST) { if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['host'])) $input_errors[] = gettext("The host name contains invalid characters."); + if (auth_get_authserver($pconfig['name'])) + $input_errors[] = "A authentication server with the same name already exists."; + /* if this is an AJAX caller then handle via JSON */ if (isAjax() && is_array($input_errors)) { input_errors2Ajax($input_errors); |