* Make nasXX_finger_type actually work since the place where nas information was...
authorkkalev <kkalev>
Wed, 9 Mar 2005 21:53:48 +0000 (21:53 +0000)
committerkkalev <kkalev>
Wed, 9 Mar 2005 21:53:48 +0000 (21:53 +0000)
  long time ago. Bug noted by Nick Bright
* In user_finger only set LD_LIBRARY_PATH once, not each time we call snmpfinger

dialup_admin/Changelog
dialup_admin/htdocs/user_finger.php3

index 6b0725e..2264fb5 100644 (file)
@@ -19,6 +19,9 @@ Ver 1.78:
 * In clear_opensessions depending on sql type use either IS NULL or = 0 in the DELETE statement.
   We need to find a cleaner solution to this. This closes bug#175
 * Log somewhat more verbose error messages when the sql_command binary is not found in the bin scripts
+* Make nasXX_finger_type actually work since the place where nas information was stored was changed a
+  long time ago. Bug noted by Nick Bright
+* In user_finger only set LD_LIBRARY_PATH once, not each time we call snmpfinger
 Ver 1.75:
 * A LOT of security related fixes. Now dialupadmin should hopefully be secure enough to
   be accessed by normal users (not administrators).
index 8ea29d2..e8696d6 100644 (file)
@@ -52,6 +52,8 @@ $tot_in = $tot_rem = 0;
 if ($link){
        $h = 21;
        $servers_num = 0;
+       if ($config[general_ld_library_path] != '')
+               putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
        foreach($nas_list as $nas){
                $num = 0;
 
@@ -69,14 +71,12 @@ if ($link){
                $community_data = $nas[community];
                $server_name[$servers_num] = $nas[name];
                $server_model[$servers_num] = $nas[model];
-               if ($config[general_ld_library_path] != '')
-                       putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
                $extra = "";
-               if ($config[$finger_type] != 'database' && $config[general_finger_type] == 'snmp'){
-                       if ($config[$nas_type] == '')
-                               $nas_type = $config[general_nas_type];
-                       else
-                               $nas_type = $nas[type];
+               $finger_type = $config[general_finger_type];
+               if ($nas[finger_type] != '')
+                       $finger_type = $nas[finger_type];
+               if ($finger_type == 'snmp'){
+                       $nas_type = ($nas[type] != '') ? $nas[type] : $config[general_nas_type];
                        if ($nas_type == '')
                                $nas_type = 'cisco';