]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Remember a few things in the user_test page. Also add another configuration file...
authorkkalev <kkalev>
Tue, 26 Nov 2002 12:30:56 +0000 (12:30 +0000)
committerkkalev <kkalev>
Tue, 26 Nov 2002 12:30:56 +0000 (12:30 +0000)
general_radius_server_auth_proto specifying the default authentication protocol of the radius
server (pap or chap).

Changelog
conf/admin.conf
htdocs/user_test.php3

index dc6c69033e16cb4b087da3e18a3d29c80bb2d1ee..1b9f15b8d049b5b0aa12169e13a4504fb5216a1f 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,9 @@ Ver 1.62:
 * We don't need ORDER BY GroupName in show_groups.php3 since we have GROUP BY
 * Use CISCO-POP-MGMT-MIB in snmpfinger instead of CISCO-CALL-HISTORY-MIB. Thanks to
   Evren Yurtesen <eyurtese@turkuamk.fi> for the suggestion.
+* Remember a few things in the user_test page. Also add another configuration file directive
+  general_radius_server_auth_proto specifying the default authentication protocol of the radius
+  server (pap or chap).
 Ver 1.61:
 * Add a string encoder for greek
 * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
index d54e15e14564963c5d3fb9ff48c868a3bc877d71..94870a7f168080d603c5ad63b1c43fbc0e97bfc9 100644 (file)
@@ -79,6 +79,10 @@ general_test_account_password: testpass
 general_radius_server: localhost
 general_radius_server_port: 1812
 #
+# can be either pap or chap
+#
+general_radius_server_auth_proto: pap
+#
 # sorry, single valued for now. Should become something like
 # password[server-name]: xxxxx
 #
index 60b99ee0d4377778a4ae25370ada0248e6b03643..2890246e3928fb66a6c30030d53e307909582864 100644 (file)
@@ -58,11 +58,15 @@ EOM;
        <tr><td>
 
 <?php
+if ($server == '')
+       $server = $config[general_radius_server];
+if ($port == 0)
+       $port = $config[general_radius_server_port];
+if ($auth_proto == '')
+       $auth_proto = $config[general_radius_server_auth_proto];
+$selected[$auth_proto] = 'selected';
+
 if ($test_user == 1){
-       if ($server == '')
-               $server = $config[general_radius_server];
-       if ($port == 0)
-               $port = $config[general_radius_server_port];
        $tmp_file = tempnam("$config[general_tmp_dir]",'DA');
        $req=file($config[general_auth_request_file]);
        if ($config[general_ld_library_path] != '')
@@ -142,7 +146,7 @@ EOM;
 User Password
 </td>
 <td>
-<input type=password name=passwd value="" size=25>
+<input type=password name=passwd value="<?php print $passwd ?>" size=25>
 </td>
 </tr>
 <tr>
@@ -150,7 +154,7 @@ User Password
 Radius Server
 </td>
 <td>
-<input type=text name=server value="<?php print $config[general_radius_server] ?>" size=25>
+<input type=text name=server value="<?php print $server ?>" size=25>
 </td>
 </tr>
 <tr>
@@ -158,7 +162,7 @@ Radius Server
 Radius Server Port
 </td>
 <td>
-<input type=text name=port value="<?php print $config[general_radius_server_port] ?>" size=25>
+<input type=text name=port value="<?php print $port ?>" size=25>
 </td>
 </tr>
 <tr>
@@ -166,7 +170,7 @@ Radius Server Port
 Extra Attributes
 </td>
 <td>
-<textarea name="extra" cols="35" wrap="PHYSICAL" rows="4"></textarea>
+<textarea name="extra" cols="35" wrap="PHYSICAL" rows="4"><?php print $extra ?></textarea>
 </td>
 </tr>
 <tr>
@@ -174,9 +178,13 @@ Extra Attributes
 Authentication Protocol
 </td>
 <td>
+<?php
+echo <<<EOM
 <select name="auth_proto" editable>
-<option selected value="pap">PAP
-<option value="chap">CHAP
+<option $selected[pap] value="pap">PAP
+<option $selected[chap] value="chap">CHAP
+EOM
+?>
 </select>
 </td>
 </tr>