diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 01:37:20 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 01:37:20 +0000 |
commit | 674fcc46e55d9920c72962e8fa1141a2a1a13b42 (patch) | |
tree | ea1cb8ac922c4cd6bbce3ac97324db9a8662e7ac | |
parent | 4ee1bef7a66cea8e6a6c718594b151d4bcea3338 (diff) | |
download | pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.tar.gz pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.tar.bz2 pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.zip |
Update Colins FreeRADIUS package
-rw-r--r-- | packages/freeradius.xml | 6 | ||||
-rw-r--r-- | packages/freeradiusclients.xml | 19 | ||||
-rw-r--r-- | packages/freeradiussettings.xml | 66 |
3 files changed, 77 insertions, 14 deletions
diff --git a/packages/freeradius.xml b/packages/freeradius.xml index fd0e0be1..2dd31e10 100644 --- a/packages/freeradius.xml +++ b/packages/freeradius.xml @@ -20,10 +20,11 @@ <text>Settings</text> <url>/pkg_edit.php?xml=freeradiussettings.xml</url> </tab> - </tabs> + </tabs> <additional_files_needed> <item>http://www.pfsense.com/packages/config/freeradiusclients.xml</item> <item>http://www.pfsense.com/packages/config/freeradiussettings.xml</item> + <item>http://www.pfsense.com/packages/config/freeradiusconfig.tgz</item> </additional_files_needed> <configpath>installedpackages->package->$packagename->configuration->settings</configpath> <adddeleteeditpagefields> @@ -85,4 +86,5 @@ <custom_add_php_command> sync_package(); </custom_add_php_command> -</packagegui>
\ No newline at end of file +</packagegui> + diff --git a/packages/freeradiusclients.xml b/packages/freeradiusclients.xml index 89598ac1..de2bc2c5 100644 --- a/packages/freeradiusclients.xml +++ b/packages/freeradiusclients.xml @@ -1,26 +1,20 @@ <packagegui> <name>freeradiusclients</name> - <menu> - <name>RADIUS Clients</name> - <tooltiptext>Add, edit, and delete RADIUS clients.</tooltiptext> - <section>Services</section> - <configfile>freeradiusclients.xml</configfile> - </menu> - <tabs> - <tab> + <tabs> + <tab> <text>Users</text> <url>/pkg_edit.php?xml=freeradius.xml</url> - </tab> + </tab> <tab> <text>Clients</text> <url>/pkg_edit.php?xml=freeradiusclients.xml</url> <active/> - </tab> + </tab> <tab> <text>Settings</text> <url>/pkg_edit.php?xml=freeradiussettings.xml</url> </tab> - </tabs> + </tabs> <configpath>installedpackages->package->$packagename->configuration->settings</configpath> <adddeleteeditpagefields> <columnitem> @@ -79,4 +73,5 @@ <custom_add_php_command> sync_package(); </custom_add_php_command> -</packagegui>
\ No newline at end of file +</packagegui> + diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml new file mode 100644 index 00000000..8776f5f3 --- /dev/null +++ b/packages/freeradiussettings.xml @@ -0,0 +1,66 @@ +<packagegui> + <name>freeradiussettings</name> + <tabs> + <tab> + <text>Users</text> + <url>/pkg_edit.php?xml=freeradius.xml</url> + </tab> + <tab> + <text>Clients</text> + <url>/pkg_edit.php?xml=freeradiusclients.xml</url> + </tab> + <tab> + <text>Settings</text> + <url>/pkg_edit.php?xml=freeradiussettings.xml</url> + <active/> + </tab> + </tabs> + <configpath>installedpackages->package->$packagename->configuration->settings</configpath> + <fields> + <field> + <fielddescr>Listening Interface(s)</fielddescr> + <fieldname>interface</fieldname> + <description>Enter the desired listening interface(s) here</description> + <type>input</type> + </field> + <field> + <fielddescr>Port</fielddescr> + <fieldname>port</fieldname> + <description>Enter the desired port here</description> + <type>input</type> + </field> + </fields> + <custom_php_command_before_form> + function sync_package() { + global $config; + $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w"); + if($config['installedpackages']['freeradiusclients']['config'] != "") { + /* Comment out port entries to use listen directives instead. + if($config['installedpackages']['freeradiussettings']['config']['port'] != "") { + fwrite($fout, "port = " . $port . "\n\n"); + } else { + fwrite($fout, "port = 0\n\n"); + } + */ + if($config['installedpackages']['freeradiussettings']['config']['interface'] != "") { + $split_int = split(" ", $config['installedpackages']['freeradiussettings']['config']['interface']); + foreach($split_int as $int) { + $int_ip = find_interface_ip($int); + fwrite($fout, "{\nipaddr = " . $int_ip . "\n"); + if($config['installedpackages']['freeradiussettings']['config']['port'] != "") { + fwrite($fout, "port = " . $port . "\n"); + } else { + fwrite($fout, "port = 0\n"); + } + fwrite($fout, "type = auth\n}"; + } + } + fclose($fout); + } + sync_package(); + </custom_php_command_before_form> + <custom_add_php_command> + sync_package(); + </custom_add_php_command> +</packagegui> + |