From: kkalev Date: Thu, 13 Feb 2003 21:23:16 +0000 (+0000) Subject: Add a per nas finger_type directive X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=8e681c98b33a66dbe5cb78a12993f0a3bd618611;p=freeradius-dialup-admin.git Add a per nas finger_type directive --- diff --git a/Changelog b/Changelog index 0f79fcd..c74d47d 100644 --- a/Changelog +++ b/Changelog @@ -11,6 +11,7 @@ Ver 1.63: * Add an entry in the FAQ about the Dialup-Access attribute * Add an entry in the FAQ about duplicate personal attributes in the user_admin page * Only show the personal attributes in the New User page if we have ldap or we are using the userinfo table in sql +* Add a per nas finger_type directive Ver 1.62: * Remove one sql query from user_admin which was not needed. * Instead of a query like "LIKE 'YYYY-MM-DD%'" use "AcctStopTime >= 'YYYY-MM-DD 00:00:00 AND AcctStopTime diff --git a/conf/admin.conf b/conf/admin.conf index 610cdfa..b07d369 100644 --- a/conf/admin.conf +++ b/conf/admin.conf @@ -111,6 +111,13 @@ nas2_model: Cisco 2511 access server nas2_ip: 147.122.122.123 nas2_port_num: 16 nas2_community: public +# +# finger type can also be set per NAS +# snmp: Use snmp to query the NAS +# database: Only query the sql database +# +# If it is not set, general_finger_type is assumed +nas2_finger_type: database nas3_name: nas3.%{general_domain} nas3_model: Cisco 5300 access server nas3_ip: 147.122.122.124 diff --git a/htdocs/user_finger.php3 b/htdocs/user_finger.php3 index f9308f0..99d83d7 100644 --- a/htdocs/user_finger.php3 +++ b/htdocs/user_finger.php3 @@ -50,6 +50,7 @@ if ($link){ $community = $nas . '_community'; $ip = $nas . '_ip'; $portnum = $nas . '_port_num'; + $finger_type = $nas . '_finger_type'; if ($config[$name] == ''){ $i--; @@ -70,7 +71,7 @@ if ($link){ if ($config[general_ld_library_path] != '') putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]"); $extra = ""; - if ($config[general_finger_type] == 'snmp'){ + if ($config[$finger_type] != 'database' && $config[general_finger_type] == 'snmp'){ $users=exec("$config[general_snmpfinger_bin] $name_data $community_data"); if (strlen($users)) $extra = "AND UserName IN ($users)";