aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Wilke <nachtfalkeaw[@]web.de>2012-01-31 20:28:45 +0100
committerAlexander Wilke <nachtfalkeaw[@]web.de>2012-01-31 20:28:45 +0100
commit849edeb4226cd563f912c1ea42d8b987a7669e0e (patch)
treed1ec9d0fa1390b8ef4e374aa3fa8d61de6639434
parentcfe99ef5e539be5586a1f56c104fb30eb3984aaf (diff)
downloadpfsense-packages-849edeb4226cd563f912c1ea42d8b987a7669e0e.tar.gz
pfsense-packages-849edeb4226cd563f912c1ea42d8b987a7669e0e.tar.bz2
pfsense-packages-849edeb4226cd563f912c1ea42d8b987a7669e0e.zip
Update config/freeradius2/freeradius.inc
-rw-r--r--config/freeradius2/freeradius.inc22
1 files changed, 17 insertions, 5 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 91a9d7f2..7d24ed2e 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -453,8 +453,14 @@ if (is_array($arrusers) && !empty($arrusers)) {
$varuserscheckitem = '';
$varusersreplyitem = '';
- // Add the user attributes to each user.
- $varuserscheckitem = '"' . $varusersusername . '"' . " Cleartext-Password := " . '"' . $varuserspassword .'"';
+ // If someone does not want to use username/password but entry "DEFAULT" instead then we can disable this
+ if (($users['varusersusername'] == '') && ($users['varuserspassword'] == '')) {
+ $varuserscheckitem = '';
+ }
+ else {
+ // Add the user attributes to each user.
+ $varuserscheckitem = '"' . $varusersusername . '"' . " Cleartext-Password := " . '"' . $varuserspassword .'"';
+ }
// Add additional CHECK-ITEMS here. Different formatting in "users" file needed.
if ($varuserssimultaneousconnect != '') {
@@ -549,7 +555,7 @@ if (is_array($arrmacs) && !empty($arrmacs)) {
$varmacsaddress = $macs['varmacsaddress'];
// We don't need a password but we need this field to make syntac correct for CHECK-ITEMS
$varmacspassword = $macs['varmacsaddress'];
-
+
$varmacssimultaneousconnect = ($macs['varmacssimultaneousconnect']?$macs['varmacssimultaneousconnect']:'');
$varmacsframedipaddress = $macs['varmacsframedipaddress'];
$varmacsframedipnetmask = $macs['varmacsframedipnetmask'];
@@ -606,8 +612,14 @@ if (is_array($arrmacs) && !empty($arrmacs)) {
$varmacscheckitem = '';
$varmacsreplyitem = '';
- // Add the mac attributes to each mac address.
- $varmacscheckitem = "$varmacsaddress" . " Cleartext-Password := " . '"' . $varmacspassword .'"';
+ // If someone does not want to use MAC address but entry "DEFAULT" instead then we can disable this
+ if ($macs['varmacsaddress'] == '') {
+ $varmacscheckitem = '';
+ }
+ else {
+ // Add the user attributes to each user.
+ $varmacscheckitem = "$varmacsaddress" . " Cleartext-Password := " . '"' . $varmacspassword . '"';
+ }
// Add additional CHECK-ITEMS here. Different formatting in "authorized_macs" file needed.
if ($varmacssimultaneousconnect != '') {