aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeradius2/freeradius.inc
diff options
context:
space:
mode:
Diffstat (limited to '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 != '') {